(start_decl): Always set DECL_COMMON on statics.
authorJason Merrill <merrill@gnu.org>
Tue, 4 Jun 1996 23:42:33 +0000 (23:42 +0000)
committerJason Merrill <merrill@gnu.org>
Tue, 4 Jun 1996 23:42:33 +0000 (23:42 +0000)
From-SVN: r12158

gcc/c-decl.c

index c89ee1d9fac3b094919feaee64aa78e703e1b466..de3f1c1fe715e64dbd40b48789c26bbf1747922c 100644 (file)
@@ -3620,7 +3620,7 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
      initializer equal to zero.  (Section 3.7.2)
      -fno-common gives strict ANSI behavior.  Usually you don't want it.
      This matters only for variables with external linkage.  */
-  if (! flag_no_common)
+  if (! flag_no_common || ! TREE_PUBLIC (decl))
     DECL_COMMON (decl) = 1;
 
   /* Set attributes here so if duplicate decl, will have proper attributes.  */