aboutsummaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/parser.c b/src/parser.c
index 16ab289..6478ed5 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -982,9 +982,14 @@ declare(Ident *ident, int maybe_knr)
&& (sp->storage != StaticStorage || level > 0)) {
sp = install_ident(ident->name, ident->storage);
} else {
- error_at_line(0, 0, filename, ident->line,
- _("%s/%d redefined"),
- ident->name, sp->arity);
+ if (sp->arity >= 0)
+ error_at_line(0, 0, filename, ident->line,
+ _("%s/%d redefined"),
+ ident->name, sp->arity);
+ else
+ error_at_line(0, 0, filename, ident->line,
+ _("%s redefined"),
+ ident->name);
error_at_line(0, 0, sp->source, sp->def_line,
_("this is the place of previous definition"));
}

Return to:

Send suggestions and report system problems to the System administrator.