diff options
author | merrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-05-06 18:36:48 +0000 |
---|---|---|
committer | merrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-05-06 18:36:48 +0000 |
commit | 9493f1421183f7c39598629fe60d37c599dfe2af (patch) | |
tree | be78d9090c203f4f4af7523158cd4c1fe16087a4 /gcc/c-decl.c | |
parent | 37e76d7d025cb2be196ea36958eab50350edc597 (diff) |
-fno-common change
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11940 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 38c25eba6af..e031546960c 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3611,9 +3611,13 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes) if (TREE_CODE (decl) == FUNCTION_DECL) gen_aux_info_record (decl, 0, 0, TYPE_ARG_TYPES (TREE_TYPE (decl)) != 0); - /* For C and Objective-C, we by default put things in .common when - possible. */ - DECL_COMMON (decl) = 1; + /* 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. + This matters only for variables with external linkage. */ + if (! flag_no_common) + DECL_COMMON (decl) = 1; /* Set attributes here so if duplicate decl, will have proper attributes. */ decl_attributes (decl, attributes, prefix_attributes); |