(import_export_class): Remove declaration.
* decl2.c (import_export_class): Make it static.
* dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
EXPR_WITH_FILE_LOCATION.
* lex.c (check_newline): Tweak filename/lineno setting.
* semantics.c (begin_while_stmt): Fix typo in comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32208
138bc75d-0d04-0410-961f-
82ee72b054a4
+2000-02-26 Mark Mitchell <mark@codesourcery.com>
+
+ * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
+ (import_export_class): Remove declaration.
+ * decl2.c (import_export_class): Make it static.
+ * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
+ PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
+ EXPR_WITH_FILE_LOCATION.
+ * lex.c (check_newline): Tweak filename/lineno setting.
+ * semantics.c (begin_while_stmt): Fix typo in comment.
+
Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* lang-options.h (-fmessage-length=): Add missing option.
/* An integer indicating how many bytes should be subtracted from the
vtable for the `this' pointer to find the vcall offset. (The vptr
- is always located at offset zero from the `this' pointer.) If
+ is always located at offset zero from the f `this' pointer.) If
zero, then there is no vcall offset. */
#define THUNK_VCALL_OFFSET(DECL) (DECL_FIELD_SIZE (DECL))
definition. This is true when the back-end tells us that
the symbol has been referenced in the generated code. If, however,
we are not generating code, then it is also true when a symbol has
- just been used somewhere, even if it's not really needed. */
+ just been used somewhere, even if it's not really needed. We need
+ anything that isn't comdat, but we don't know for sure whether or
+ not something is comdat until end-of-file. */
#define DECL_NEEDED_P(DECL) \
- (! DECL_COMDAT (DECL) \
+ ((at_eof && !DECL_COMDAT (DECL)) \
|| (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME ((DECL)))) \
|| (flag_syntax_only && TREE_USED ((DECL))))
extern tree coerce_new_type PARAMS ((tree));
extern tree coerce_delete_type PARAMS ((tree));
extern void comdat_linkage PARAMS ((tree));
-extern void import_export_class PARAMS ((tree));
extern void import_export_vtable PARAMS ((tree, tree, int));
extern void import_export_decl PARAMS ((tree));
extern tree build_cleanup PARAMS ((tree));
PARAMS ((splay_tree_node, void *));
static tree prune_vars_needing_no_initialization PARAMS ((tree));
static void write_out_vars PARAMS ((tree));
+static void import_export_class PARAMS ((tree));
extern int current_class_depth;
/* Determine whether or not we want to specifically import or export CTYPE,
using various heuristics. */
-void
+static void
import_export_class (ctype)
tree ctype;
{
/* -1 for imported, 1 for exported. */
int import_export = 0;
+ /* It only makes sense to call this function at EOF. The reason is
+ that this function looks at whether or not the first non-inline
+ non-abstract virtual member function has been defined in this
+ translation unit. But, we can't possibly know that until we've
+ seen the entire translation unit. */
+ my_friendly_assert (at_eof, 20000226);
+
if (CLASSTYPE_INTERFACE_KNOWN (ctype))
return;
case COMPONENT_REF:
case COMPOUND_EXPR:
case ARRAY_REF:
+ case PREDECREMENT_EXPR:
+ case PREINCREMENT_EXPR:
+ case POSTDECREMENT_EXPR:
+ case POSTINCREMENT_EXPR:
/* These nodes are binary, but do not have code class `2'. */
dump_child ("op 0", TREE_OPERAND (t, 0));
dump_child ("op 1", TREE_OPERAND (t, 1));
dump_child ("args", TREE_OPERAND (t, 1));
dump_child ("decl", TREE_OPERAND (t, 2));
break;
+
+ case EXPR_WITH_FILE_LOCATION:
+ dump_child ("expr", EXPR_WFL_NODE (t));
+ break;
default:
/* There are no additional fields to print. */
pop_srcloc ();
input_file_stack->name = new_file;
- lineno = l;
debug_end_source_file (input_file_stack->line);
}
else
error ("#-lines for entering and leaving files don't match");
}
+ input_filename = new_file;
+ lineno = l;
+
extract_interface_info ();
/* skip the rest of this line. */
return r;
}
-/* Process the COND of an if-statement, which may be given by
+/* Process the COND of a while-statement, which may be given by
WHILE_STMT. */
void
--- /dev/null
+// Origin: Mark Mitchell <mark@codesourcery.com>
+
+#include <list>
+
+list<int*> li;
+
+void f ()
+{
+ li.size ();
+}
+
+int main ()
+{
+ li.push_back (0);
+ f ();
+}