diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gcc/c-decl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c index bbfe617..26431d0 100644 --- a/contrib/gcc/c-decl.c +++ b/contrib/gcc/c-decl.c @@ -1264,7 +1264,10 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl, && !(DECL_EXTERNAL (olddecl) && !DECL_EXTERNAL (newdecl)) /* Don't warn about forward parameter decls. */ && !(TREE_CODE (newdecl) == PARM_DECL - && TREE_ASM_WRITTEN (olddecl) && !TREE_ASM_WRITTEN (newdecl))) + && TREE_ASM_WRITTEN (olddecl) && !TREE_ASM_WRITTEN (newdecl)) + /* Don't warn about a variable definition following a declaration. */ + && !(TREE_CODE (newdecl) == VAR_DECL + && DECL_INITIAL (newdecl) && !DECL_INITIAL (olddecl))) { warning ("%Jredundant redeclaration of '%D'", newdecl, newdecl); warned = true; |