diff options
author | H.J. Lu <hjl@gnu.org> | 1999-02-21 19:42:18 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-02-21 12:42:18 -0700 |
commit | b4bb92e52f7d5f1dbd2f95e829c2d789d57609af (patch) | |
tree | 550b3f48767c3b6cb555a166b4acaf7ce22348bc | |
parent | 7bd19d63fd0a9e579585119f8727f5835d870eac (diff) | |
download | gcc-b4bb92e52f7d5f1dbd2f95e829c2d789d57609af.zip gcc-b4bb92e52f7d5f1dbd2f95e829c2d789d57609af.tar.gz gcc-b4bb92e52f7d5f1dbd2f95e829c2d789d57609af.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3a8d0db..c77d184 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 70120de..dddf4a8 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -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 (); |