decl2.c (start_objects): Make file scope constructors and destructors local to the file if...

* 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: r25354
This commit is contained in:
H.J. Lu 1999-02-21 19:42:18 +00:00 committed by Jeff Law
parent 7bd19d63fd
commit b4bb92e52f
2 changed files with 11 additions and 0 deletions

View 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.
1999-02-19 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.

View File

@ -2937,6 +2937,11 @@ start_objects (method_type, initp)
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 ();