commit f40eebe22cd78f1256af2ea86fe9f64a4d74f00e
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Sat Sep 26 22:06:52 2015 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Sat Sep 26 22:06:52 2015 +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.

diff --git a/cc1/cpp.c b/cc1/cpp.c
index 5bc0515..7205328 100644
--- 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++ = ' ';

Reply via email to