scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit f40eebe22cd78f1256af2ea86fe9f64a4d74f00e
parent dfda6fe8550bbdbf1176c76cdbc943cc5a6dec86
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 26 Sep 2015 22:06:52 +0200

Mark as used parameters in macro invocations

If we don't mark them as used then any non used parameter of a macro
will generate a warning in every invocation of the macro.

Diffstat:
Mcc1/cpp.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/cc1/cpp.c b/cc1/cpp.c @@ -67,6 +67,8 @@ nextcpp(void) if (yylen + 1 > arglen) error("argument overflow invoking macro \"%s\"", macroname); + if (yytoken == IDEN) + yylval.sym->flags |= ISUSED; memcpy(argp, yytext, yylen); argp += yylen; *argp++ = ' ';