diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-05 23:18:02 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-05 23:18:02 +0000 |
commit | c5aa1e92211d8e1c3768a94c7a1fcf7e72e8cf80 (patch) | |
tree | 017db6c8be411c52ab98093e94dcce3c7ca3f029 /gcc/c-decl.c | |
parent | 870d7a364fabca1efd21f7b8a996934ab7f91805 (diff) | |
download | gcc-c5aa1e92211d8e1c3768a94c7a1fcf7e72e8cf80.tar.gz |
* Check in merge from gcc2. See ChangeLog.12 for details.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19553 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 2b484158854..125aa01ad70 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2088,6 +2088,7 @@ pushdecl (x) DECL_SOURCE_LINE (IDENTIFIER_IMPLICIT_DECL (name)), "previous declaration of `%s'", IDENTIFIER_POINTER (name)); + TREE_THIS_VOLATILE (name) = 1; } if (t != 0 && duplicate_decls (x, t, different_binding_level)) @@ -2291,8 +2292,11 @@ pushdecl (x) else if (TREE_CODE (x) == TYPE_DECL) ; else if (IDENTIFIER_IMPLICIT_DECL (name)) - pedwarn ("`%s' was declared implicitly `extern' and later `static'", - IDENTIFIER_POINTER (name)); + { + if (! TREE_THIS_VOLATILE (name)) + pedwarn ("`%s' was declared implicitly `extern' and later `static'", + IDENTIFIER_POINTER (name)); + } else pedwarn ("`%s' was declared `extern' and later `static'", IDENTIFIER_POINTER (name)); @@ -4402,9 +4406,10 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) if (type == 0) { - if (! (specbits & ((1 << (int) RID_LONG) | (1 << (int) RID_SHORT) - | (1 << (int) RID_SIGNED) - | (1 << (int) RID_UNSIGNED)))) + if ((! (specbits & ((1 << (int) RID_LONG) | (1 << (int) RID_SHORT) + | (1 << (int) RID_SIGNED) + | (1 << (int) RID_UNSIGNED)))) + && ! (in_system_header && ! allocation_temporary_p ())) { /* C9x will probably require a diagnostic here. For now, issue a warning if -Wreturn-type and this is a function, |