commit 298b9d10ce37f28fa4e09a13df94835de354d696
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Thu Jan 28 08:17:19 2016 +0100
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Thu Jan 28 08:17:19 2016 +0100

    [cc1] Re-emit tentative definitions
    
    We need '(' at the end of definitions with initializer, but we cannot have 
it
    if we don't emit again the definition.

diff --git a/cc1/init.c b/cc1/init.c
index 6b38a7a..2464bbd 100644
--- a/cc1/init.c
+++ b/cc1/init.c
@@ -308,6 +308,7 @@ initializer(Symbol *sym, Type *tp)
                        return;
                }
                sym->flags |= HASINIT;
+               sym->flags &= ~ISEMITTED;
                emit(ODECL, sym);
                emit(OINIT, np);
                sym->flags |= ISDEFINED;
diff --git a/cc1/tests/test038.c b/cc1/tests/test038.c
index 44c1614..3b27423 100644
--- a/cc1/tests/test038.c
+++ b/cc1/tests/test038.c
@@ -6,7 +6,7 @@ error:
 test038.c:43: error: redeclaration of 'x'
 output:
 G1     I       "x
-       (
+G1     I       "x      (
        #I0
 )
 G5     F       "foo

Reply via email to