aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1998-05-05 17:18:02 -0600
committerJeff Law <law@gcc.gnu.org>1998-05-05 17:18:02 -0600
commitf5963e617044e79f7658c82ebc9acdccdc56d57b (patch)
tree017db6c8be411c52ab98093e94dcce3c7ca3f029 /gcc/c-decl.c
parent9d1bcb4667cf94ae02b3b3015694a55175be9c9f (diff)
downloadgcc-f5963e617044e79f7658c82ebc9acdccdc56d57b.zip
gcc-f5963e617044e79f7658c82ebc9acdccdc56d57b.tar.gz
gcc-f5963e617044e79f7658c82ebc9acdccdc56d57b.tar.bz2
* Check in merge from gcc2. See ChangeLog.12 for details.
From-SVN: r19553
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 2b48415..125aa01 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,