From: Matthias Braun Date: Fri, 1 Aug 2008 08:57:47 +0000 (+0000) Subject: improve error message a bit X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=cf80e941ca33006ab52321c2c74c6c30a7a4d10a;p=cparser improve error message a bit [r20883] --- diff --git a/parser.c b/parser.c index 81c2ef8..372c19e 100644 --- a/parser.c +++ b/parser.c @@ -2525,8 +2525,9 @@ static declaration_t *parse_compound_type_specifier(bool is_struct) if(token.type == '{') { if (declaration->init.complete) { assert(symbol != NULL); - errorf(HERE, "multiple definitions of '%s %Y'", - is_struct ? "struct" : "union", symbol); + errorf(HERE, "multiple definitions of '%s %Y' (previous definition at %P)", + is_struct ? "struct" : "union", symbol, + &declaration->source_position); declaration->scope.declarations = NULL; } declaration->init.complete = true;