From: Matthias Braun Date: Thu, 7 Aug 2008 12:39:17 +0000 (+0000) Subject: better fix X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=28fe814110e20a3c43a79af2ee2444f9d8ea4f1e;p=cparser better fix [r21045] --- diff --git a/parser.c b/parser.c index 8e89ce8..ba8db6e 100644 --- a/parser.c +++ b/parser.c @@ -3470,6 +3470,7 @@ static declaration_t *parse_parameters(function_type_t *type) /* func(void) is not a parameter */ if (last_parameter == NULL && token.type == ')' + && declaration->symbol == NULL && skip_typeref(declaration->type) == type_void) { goto parameters_finished; } diff --git a/parsetest/shouldfail/badparam.c b/parsetest/shouldfail/badparam.c new file mode 100644 index 0000000..d67b996 --- /dev/null +++ b/parsetest/shouldfail/badparam.c @@ -0,0 +1,8 @@ +typedef void AVoid; + +int f(AVoid f); + +int main(void) +{ + return 0; +}