]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
decl2.c (start_objects): Make file scope constructors and destructors local to the...
authorH.J. Lu <hjl@gnu.org>
Sun, 21 Feb 1999 19:43:30 +0000 (19:43 +0000)
committerJeff Law <law@gcc.gnu.org>
Sun, 21 Feb 1999 19:43:30 +0000 (12:43 -0700)

        * decl2.c (start_objects): Make file scope constructors and
        destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
        ASM_OUTPUT_DESTRUCTOR are defined.

From-SVN: r25355

gcc/cp/ChangeLog
gcc/cp/decl2.c

index 49d5611bae9135a81209ad9c7f7fb73b81afe18f..e55c48aa2be4dd0cca1141009a4b32c5bc98608a 100644 (file)
@@ -1,3 +1,9 @@
+Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
+
+       * decl2.c (start_objects): Make file scope constructors and
+       destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
+       ASM_OUTPUT_DESTRUCTOR are defined.
+
 Sat Feb 20 15:08:42 1999  Jeffrey A Law  (law@cygnus.com)
 
        1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
index 903da7639904886c7b6db3f3a95310892bca501e..b7fe1394d3b3db7a1be2c730c9c95483f85054f9 100644 (file)
@@ -2943,6 +2943,11 @@ start_objects (method_type)
                                        NULL_TREE),
                  NULL_TREE, 0);
 
+#if defined(ASM_OUTPUT_CONSTRUCTOR) && defined(ASM_OUTPUT_DESTRUCTOR)
+  /* It can be a static function with .ctors/.dtors sections. */
+  TREE_PUBLIC (current_function_decl) = 0;
+#endif
+
   store_parm_decls ();
   pushlevel (0);
   clear_last_expr ();