ref: 089ee27ee2b410c3cd74d81089e8889a7c891e7e
parent: 391e7cf76385ab57add8fc39c8d0d380eedb6db8
author: Roberto E. Vargas Caballero <[email protected]>
date: Sat Sep 26 15:19:55 EDT 2015
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().
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
@@ -26,13 +26,7 @@
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