diff options
author | Richard Stallman <rms@gnu.org> | 1992-09-11 23:22:07 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-09-11 23:22:07 +0000 |
commit | d847e6a7b522b519a90cce02c19e17b4abbedeb8 (patch) | |
tree | d872341bde6c624cded7877305b982089f60427c | |
parent | e9cfad814ffb9f98aff768846faf17f3078ddf4a (diff) | |
download | gcc-d847e6a7b522b519a90cce02c19e17b4abbedeb8.zip gcc-d847e6a7b522b519a90cce02c19e17b4abbedeb8.tar.gz gcc-d847e6a7b522b519a90cce02c19e17b4abbedeb8.tar.bz2 |
(duplicate_decls): For file-scope redefinitions,
error message distinguishes previous definitions from mere decls.
From-SVN: r2108
-rw-r--r-- | gcc/c-decl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 59d0c52..d0f0c1c 100644 --- 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 |