commit 089ee27ee2b410c3cd74d81089e8889a7c891e7e
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Sat Sep 26 19:19:55 2015 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Sat Sep 26 19:19:55 2015 +0200

    Rewrite defmacro()
    
    After the change in the implementation of the symbol table is
    needed to call te install to have the symbol installed in
    the table, but before that patch it was only needed calling to
    lookup().

diff --git a/cc1/cpp.c b/cc1/cpp.c
index 2c4587f..ce24967 100644
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
@@ -26,13 +26,7 @@ int disexpand;
 static Symbol *
 defmacro(char *s)
 {
-       Symbol *sym;
-
-       strcpy(yytext, s);
-       sym = lookup(NS_CPP, yytext);
-       /* FIXME: We have a problem here */
-       sym->flags |= ISDECLARED;
-       return sym;
+       return install(NS_CPP, lookup(NS_CPP, s));
 }
 
 void

Reply via email to