Commit d847e6a7 by Richard Stallman

(duplicate_decls): For file-scope redefinitions,

error message distinguishes previous definitions from mere decls.

From-SVN: r2108
parent e9cfad81
...@@ -1408,7 +1408,10 @@ duplicate_decls (newdecl, olddecl) ...@@ -1408,7 +1408,10 @@ duplicate_decls (newdecl, olddecl)
{ {
error_with_decl (newdecl, errmsg); error_with_decl (newdecl, errmsg);
error_with_decl (olddecl, 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 else if (TREE_CODE (olddecl) == FUNCTION_DECL
&& DECL_INITIAL (olddecl) != 0 && DECL_INITIAL (olddecl) != 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment