diff options
author | Michael Forney <mforney@mforney.org> | 2019-02-17 12:04:40 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-02-17 12:04:40 -0800 |
commit | 6e457e2a7da38bf5ea9779f30deb21dbb78f2ebd (patch) | |
tree | f3b2c289cc966ffe8b6a924907dcb7740b15cde9 | |
parent | 2c173d25b04cfde067e3d4b32e4afc61e3e82b0b (diff) | |
download | cproc-6e457e2a7da38bf5ea9779f30deb21dbb78f2ebd.tar.xz |
Only need to read parameter declarations when identifier list is non-empty
-rw-r--r-- | decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -817,7 +817,7 @@ decl(struct scope *s, struct function *f) t->func.isnoreturn |= fs & FUNCNORETURN; if (f && sc && sc != SCEXTERN) /* 6.7.1p7 */ error(&tok.loc, "function '%s' with block scope may only have storage class 'extern'", name); - if (!t->func.isprototype && t->func.paraminfo) { + if (!t->func.isprototype && t->func.params) { if (!allowfunc) error(&tok.loc, "function declaration not allowed"); /* collect type information for parameters before we check compatibility */ |