diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 59d0c52491a..d0f0c1c8b3a 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