]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
In gcc/:
authorGeoffrey Keating <geoffk@gcc.gnu.org>
Wed, 1 Nov 2006 05:16:14 +0000 (05:16 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Wed, 1 Nov 2006 05:16:14 +0000 (05:16 +0000)
* toplev.c (compile_file): Call final_write_globals
even if there have been errors.
In gcc/cp/:
* decl2.c (cp_write_global_declarations): Rename from
cp_finish_file.
* cp-lang.c (finish_file): Don't call cp_finish_file.
* cp-tree.h (cp_write_global_declarations): Rename from
cp_finish_file.
* cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
cp_write_global_declarations.

From-SVN: r118362

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cp-lang.c
gcc/cp/cp-objcp-common.h
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/toplev.c

index e60fc548fef68512e70108507b044e87889fabb3..9c6a836a38faf2169258a4da02cf64b940e5808a 100644 (file)
@@ -1,4 +1,9 @@
-2006-09-07  Eric Christopher  <echristo@apple.com>
+2006-10-31  Geoffrey Keating  <geoffk@apple.com>
+
+       * toplev.c (compile_file): Call final_write_globals
+       even if there have been errors.
+       
+2006-10-31  Eric Christopher  <echristo@apple.com>
            Falk Hueffner  <falk@debian.org>
 
        * doc/extend.texi (__builtin_bswap32): Document.
index 27d86cd49bac3e864fe294629316f935eacd3223..add6b2c33898fbe5e425ffdd8b7de305fdceb2bc 100644 (file)
@@ -1,3 +1,13 @@
+2006-09-25  Geoffrey Keating  <geoffk@apple.com>
+
+       * decl2.c (cp_write_global_declarations): Rename from
+       cp_finish_file.
+       * cp-lang.c (finish_file): Don't call cp_finish_file.
+       * cp-tree.h (cp_write_global_declarations): Rename from
+       cp_finish_file.
+       * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
+       cp_write_global_declarations.
+
 2006-10-31  Geoffrey Keating  <geoffk@apple.com>
 
        * name-lookup.c (get_anonymous_namespace_name): New.
index 60503278930952b5ddbd22b4c40da00c3f1c8d40..793046b3469d34b0cc481e07d65d624df96b53e2 100644 (file)
@@ -141,7 +141,6 @@ cp_init_ts (void)
 void
 finish_file (void)
 {
-  cp_finish_file ();
 }
 
 #include "gtype-cp.h"
index 5424d77ae87554d764c78127f220cdd2581229e0..23e1f0ffff1f2d77586240edfffced7dcb16a354 100644 (file)
@@ -84,7 +84,7 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
 #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
 #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl
 #undef LANG_HOOKS_WRITE_GLOBALS
-#define LANG_HOOKS_WRITE_GLOBALS lhd_do_nothing
+#define LANG_HOOKS_WRITE_GLOBALS cp_write_global_declarations
 #undef LANG_HOOKS_COMDAT_GROUP
 #define LANG_HOOKS_COMDAT_GROUP cxx_comdat_group
 #undef  LANG_HOOKS_BUILTIN_FUNCTION
index a8fa8a7e1fa60568042d8a5b40d93128177fb0bb..0fdbf82d02c8ce267d9db8b0d1c9a852bc233a97 100644 (file)
@@ -3968,7 +3968,7 @@ extern tree grokbitfield (const cp_declarator *, cp_decl_specifier_seq *,
                          tree);
 extern void cplus_decl_attributes              (tree *, tree, int);
 extern void finish_anon_union                  (tree);
-extern void cp_finish_file                     (void);
+extern void cp_write_global_declarations       (void);
 extern tree coerce_new_type                    (tree);
 extern tree coerce_delete_type                 (tree);
 extern void comdat_linkage                     (tree);
index e4b5c00a31e5a282f79c8e24e9f44fa2ac5f3616..43889181f2f1e8a7e6de084472808d88c4f0ef19 100644 (file)
@@ -3027,13 +3027,13 @@ build_java_method_aliases (void)
     }
 }
 
-/* This routine is called from the last rule in yyparse ().
+/* This routine is called at the end of compilation.
    Its job is to create all the code needed to initialize and
    destroy the global aggregates.  We do the destruction
    first, since that way we only need to reverse the decls once.  */
 
 void
-cp_finish_file (void)
+cp_write_global_declarations (void)
 {
   tree vars;
   bool reconsider;
index 53fcdfe580c830bd125b6683dad61a8e173f71e8..0f24ce3ebe4b1a9949f37fc774807b2e1c794195 100644 (file)
@@ -1040,10 +1040,14 @@ compile_file (void)
      what's left of the symbol table output.  */
   timevar_pop (TV_PARSE);
 
-  if (flag_syntax_only || errorcount || sorrycount)
+  if (flag_syntax_only)
     return;
 
   lang_hooks.decls.final_write_globals ();
+
+  if (errorcount || sorrycount)
+    return;
+
   cgraph_varpool_assemble_pending_decls ();
   finish_aliases_2 ();