aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-04-10 08:20:36 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-04-10 08:20:36 -0400
commit4580042b083296478be10bac66821088ee07ef46 (patch)
treee6a9f06005fc6578dd312600bb1a5f8ba5dd8803 /gcc
parentbbb1ae016cedce6f118a402e2aa92d701be5e366 (diff)
downloadgcc-4580042b083296478be10bac66821088ee07ef46.zip
gcc-4580042b083296478be10bac66821088ee07ef46.tar.gz
gcc-4580042b083296478be10bac66821088ee07ef46.tar.bz2
(make_decl_rtl): Allow section attribute if...
(make_decl_rtl): Allow section attribute if -fno-common or variable is not to be placed in common for some other reason. From-SVN: r9348
Diffstat (limited to 'gcc')
-rw-r--r--gcc/varasm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 818628b..865de48 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -538,7 +538,9 @@ make_decl_rtl (decl, asmspec, top_level)
unit that behaved thusly). So warn the user. */
else if (TREE_CODE (decl) == VAR_DECL
&& DECL_SECTION_NAME (decl) != NULL_TREE
- && DECL_INITIAL (decl) == NULL_TREE)
+ && DECL_INITIAL (decl) == NULL_TREE
+ && DECL_COMMON (decl)
+ && ! flag_no_common)
{
warning_with_decl (decl,
"section attribute ignored for uninitialized variable `%s'");