[hackers] [scc] Rewrite defmacro() || Roberto E. Vargas Caballero
commit 089ee27ee2b410c3cd74d81089e8889a7c891e7e
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sat Sep 26 19:19:55 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -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
Received on Sat Sep 26 2015 - 19:22:25 CEST
This archive was generated by hypermail 2.3.0
: Sat Sep 26 2015 - 19:24:11 CEST