better fix
authorMatthias Braun <matze@braunis.de>
Thu, 7 Aug 2008 12:39:17 +0000 (12:39 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 7 Aug 2008 12:39:17 +0000 (12:39 +0000)
[r21045]

parser.c
parsetest/shouldfail/badparam.c [new file with mode: 0644]

index 8e89ce8..ba8db6e 100644 (file)
--- 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 (file)
index 0000000..d67b996
--- /dev/null
@@ -0,0 +1,8 @@
+typedef void AVoid;
+
+int f(AVoid f);
+
+int main(void)
+{
+       return 0;
+}