diff options
author | Richard Henderson <rth@redhat.com> | 2002-05-15 17:14:24 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-05-15 17:14:24 -0700 |
commit | 34fb9ba554ab82c877dc0475d78deb166c745941 (patch) | |
tree | 894268a09d2e902af191bc2e452a1bcab3f8eaa1 /gcc/varasm.c | |
parent | 62e118f59f99d1066c4577d1321c90f5f7a5589d (diff) | |
download | gcc-34fb9ba554ab82c877dc0475d78deb166c745941.zip gcc-34fb9ba554ab82c877dc0475d78deb166c745941.tar.gz gcc-34fb9ba554ab82c877dc0475d78deb166c745941.tar.bz2 |
varasm.c (merge_weak): Remove special case for extern and common.
* varasm.c (merge_weak): Remove special case for extern and common.
* gcc.dg/weak-5.c (vfoo1c, vfoo1g): Warn here.
From-SVN: r53498
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 05a8ada..4a88412 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -4848,16 +4848,7 @@ merge_weak (newdecl, olddecl) have done so in a way that will not function properly with a weak symbol. */ else if (TREE_USED (olddecl) - && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (olddecl)) - /* ??? Not impossible that some platform may generate code - that doesn't function *at all* with incorrect declaration - before use. However, all known at present will assume - exteral and common symbols are not "local". */ - /* ??? Probably these exceptions to the rule will just - confuse users about the true nature of the problem and - we should warn for *any* use before weakening. */ - && ! (DECL_EXTERNAL (olddecl) - || DECL_COMMON (olddecl))) + && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (olddecl))) warning_with_decl (newdecl, "weak declaration of `%s' after first use results in unspecified behavior"); if (SUPPORTS_WEAK) |