aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-07-28 10:36:31 -0700
committerJim Wilson <wilson@gcc.gnu.org>1993-07-28 10:36:31 -0700
commit214326607004acfdc3195aa647e1652800014350 (patch)
tree5ceaace2277b96c2f0f0ea6e4a96eab4e3873919 /gcc
parent02892e06947cb46281f67b48eb7da56a86f6b9d9 (diff)
downloadgcc-214326607004acfdc3195aa647e1652800014350.zip
gcc-214326607004acfdc3195aa647e1652800014350.tar.gz
gcc-214326607004acfdc3195aa647e1652800014350.tar.bz2
(assemble_variable): Flag_no_common applies only if
external linkage. From-SVN: r5019
Diffstat (limited to 'gcc')
-rw-r--r--gcc/varasm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 57024d5..dc1a626 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -827,8 +827,9 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
/* ANSI specifies that a tentative definition which is not merged with
a non-tentative definition behaves exactly like a definition with an
initializer equal to zero. (Section 3.7.2)
- -fno-common gives strict ANSI behavior. Usually you don't want it. */
- if (! flag_no_common
+ -fno-common gives strict ANSI behavior. Usually you don't want it.
+ This matters only for variables with external linkage. */
+ if ((! flag_no_common || ! TREE_PUBLIC (decl))
&& ! dont_output_data
&& (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node))
{