aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-05-14 01:59:23 -0700
committerMichael Forney <mforney@mforney.org>2019-05-14 01:59:23 -0700
commit3aedaa781bd58d1cc79ea309be27bfd207e39482 (patch)
treead1b9314d9bb4a0a2fe8b23af3b74c841f0ba524
parent8b21975e8221668eababac73aece15fda47c2f7c (diff)
downloadcproc-3aedaa781bd58d1cc79ea309be27bfd207e39482.tar.xz
Use correct terminology in error message
-rw-r--r--decl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/decl.c b/decl.c
index a5c4baf..d532029 100644
--- a/decl.c
+++ b/decl.c
@@ -924,7 +924,7 @@ decl(struct scope *s, struct func *f)
error(&tok.loc, "function '%s' with block scope may only have storage class 'extern'", name);
if (!t->func.isprototype && t->func.params) {
if (!allowfunc)
- error(&tok.loc, "function declaration not allowed");
+ error(&tok.loc, "function definition not allowed");
/* collect type information for parameters before we check compatibility */
while (paramdecl(s, t->func.params))
;
@@ -938,7 +938,7 @@ decl(struct scope *s, struct func *f)
d = declcommon(s, kind, name, t, tq, sc, prior);
if (tok.kind == TLBRACE) {
if (!allowfunc)
- error(&tok.loc, "function declaration not allowed");
+ error(&tok.loc, "function definition not allowed");
if (d->defined)
error(&tok.loc, "function '%s' redefined", name);
s = mkscope(&filescope);