From: fche Date: Wed, 13 Oct 2004 18:18:18 +0000 (+0000) Subject: 2004-10-13 Frank Ch. Eigler X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=e68ba323fd543681236c6e56702da2e290d30c87 2004-10-13 Frank Ch. Eigler * toplev.c (compile_file): Call mudflap_finish_file from here ... * c-decl.c (c_write_global_declarations): ... instead of here ... * cp/decl.c (cp_finish_file): ... and here. * tree-mudflap.c (mudflap_enqueue_decl): Reword a warning message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88995 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17e62d0ec93..d1c9fe0e374 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-10-13 Frank Ch. Eigler + + * toplev.c (compile_file): Call mudflap_finish_file from here ... + * c-decl.c (c_write_global_declarations): ... instead of here ... + * cp/decl.c (cp_finish_file): ... and here. + * tree-mudflap.c (mudflap_enqueue_decl): Reword a warning message. + 2004-10-13 Andrew Pinski * tree-ssa-dom.c (record_range): Free the element if we are not diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 4d6d24bcb74..b548f850dd3 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -7300,11 +7300,6 @@ c_write_global_declarations (void) /* We're done parsing; proceed to optimize and emit assembly. FIXME: shouldn't be the front end's responsibility to call this. */ cgraph_optimize (); - - /* Presently this has to happen after cgraph_optimize. - FIXME: shouldn't be the front end's responsibility to call this. */ - if (flag_mudflap) - mudflap_finish_file (); } #include "gt-c-decl.h" diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 7a55907ab6e..6562f2828c6 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -3066,11 +3066,6 @@ cp_finish_file (void) cgraph_finalize_compilation_unit (); cgraph_optimize (); - /* Emit mudflap static registration function. This must be done - after all the user functions have been expanded. */ - if (flag_mudflap) - mudflap_finish_file (); - /* Now, issue warnings about static, but not defined, functions, etc., and emit debugging information. */ walk_namespaces (wrapup_globals_for_namespace, /*data=*/&reconsider); diff --git a/gcc/toplev.c b/gcc/toplev.c index eaeeecaca4d..31dbbe1e627 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -80,6 +80,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "coverage.h" #include "value-prof.h" #include "alloc-pool.h" +#include "tree-mudflap.h" #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO) #include "dwarf2out.h" @@ -1004,6 +1005,10 @@ compile_file (void) functions in this compilation unit were deferred. */ coverage_finish (); + /* Likewise for mudflap static object registrations. */ + if (flag_mudflap) + mudflap_finish_file (); + /* Write out any pending weak symbol declarations. */ weak_finish (); diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c index bc42de7096a..f4d3d47bdd4 100644 --- a/gcc/tree-mudflap.c +++ b/gcc/tree-mudflap.c @@ -1215,7 +1215,7 @@ mudflap_enqueue_decl (tree obj) for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_static_decls); i++) if (VARRAY_TREE (deferred_static_decls, i) == obj) { - warning ("mudflap cannot track lifetime of %qs", + warning ("mudflap cannot track unknown size extern %qs", IDENTIFIER_POINTER (DECL_NAME (obj))); return; }