From: Jim Wilson Date: Wed, 28 Jul 1993 17:36:31 +0000 (-0700) Subject: (assemble_variable): Flag_no_common applies only if X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=214326607004acfdc3195aa647e1652800014350;p=gcc.git (assemble_variable): Flag_no_common applies only if external linkage. From-SVN: r5019 --- diff --git a/gcc/varasm.c b/gcc/varasm.c index 57024d5e157..dc1a6262a2e 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)) {