improve error message a bit
authorMatthias Braun <matze@braunis.de>
Fri, 1 Aug 2008 08:57:47 +0000 (08:57 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 1 Aug 2008 08:57:47 +0000 (08:57 +0000)
[r20883]

parser.c

index 81c2ef8..372c19e 100644 (file)
--- 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;