cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.

* 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.

From-SVN: r32208
This commit is contained in:
Mark Mitchell 2000-02-27 02:46:57 +00:00 committed by Mark Mitchell
parent a8f8d1cce5
commit 27d26ee7a7
7 changed files with 53 additions and 7 deletions

View File

@ -1,3 +1,14 @@
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.

View File

@ -2870,7 +2870,7 @@ extern int flag_new_for_scope;
/* 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))
@ -2878,9 +2878,11 @@ extern int flag_new_for_scope;
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))))
@ -3831,7 +3833,6 @@ extern void finish_builtin_type PARAMS ((tree, const char *,
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));

View File

@ -91,6 +91,7 @@ static int generate_ctor_and_dtor_functions_for_priority
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;
@ -2440,13 +2441,20 @@ import_export_vtable (decl, type, final)
/* 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;

View File

@ -804,6 +804,10 @@ dequeue_and_dump (di)
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));
@ -858,6 +862,10 @@ dequeue_and_dump (di)
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. */

View File

@ -2630,13 +2630,15 @@ linenum:
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. */

View File

@ -281,7 +281,7 @@ begin_while_stmt ()
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

View File

@ -0,0 +1,16 @@
// Origin: Mark Mitchell <mark@codesourcery.com>
#include <list>
list<int*> li;
void f ()
{
li.size ();
}
int main ()
{
li.push_back (0);
f ();
}