projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9cfad8
)
(duplicate_decls): For file-scope redefinitions,
author
Richard Stallman
<rms@gnu.org>
Fri, 11 Sep 1992 23:22:07 +0000
(23:22 +0000)
committer
Richard Stallman
<rms@gnu.org>
Fri, 11 Sep 1992 23:22:07 +0000
(23:22 +0000)
error message distinguishes previous definitions from mere decls.
From-SVN: r2108
gcc/c-decl.c
patch
|
blob
|
history
diff --git
a/gcc/c-decl.c
b/gcc/c-decl.c
index 59d0c52491a5f58470afafd6e57a490ca7f1ec53..d0f0c1c8b3a0abec679d35f5a03012ab52b75e9d 100644
(file)
--- a/
gcc/c-decl.c
+++ b/
gcc/c-decl.c
@@
-1408,7
+1408,10
@@
duplicate_decls (newdecl, olddecl)
{
error_with_decl (newdecl, errmsg);
error_with_decl (olddecl,
- "`%s' previously declared here");
+ ((DECL_INITIAL (olddecl)
+ && current_binding_level == global_binding_level)
+ ? "`%s' previously defined here"
+ : "`%s' previously declared here"));
}
else if (TREE_CODE (olddecl) == FUNCTION_DECL
&& DECL_INITIAL (olddecl) != 0