commit 486b07bfc9005abb6f11749d48d07fccd7118ef2
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Tue Jul 28 07:30:31 2015 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Tue Jul 28 07:34:51 2015 +0200

    Woraround to crash in funcdcl()
    
    funcdcl() crash with a declaration like f() because the 'default int'
    rule was generating a integer type which didn't match any parameter.
    This commit fix the problem detecting it.
    
    This is only a workaround until I rewrite decl.c

diff --git a/cc1/decl.c b/cc1/decl.c
index c16c9ac..7e3c5fd 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -69,7 +69,7 @@ fundcl(struct dcldata *dp)
        expect('(');
 
        n = noname = 0;
-       do {
+       if (yytoken != ')') do {
                if ((sym = parameter()) == NULL) {
                        if (n == 0)
                                break;

Reply via email to