commit c0e2b0c3d1aac699ef0484f9f56884eb48ea9cde
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Fri May 13 14:57:18 2016 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Fri May 13 14:57:18 2016 +0200

    [cc1] Simplify pragma() message printing
    
    There is no need of printing character by character when you
    can print the full string at once.

diff --git a/cc1/cpp.c b/cc1/cpp.c
index a832172..ae3204f 100644
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
@@ -548,16 +548,13 @@ pragma(void)
 {
        static char magic[] = {
        #include "stallman.msg"
-       }, *p = magic;
-       extern int warnings;
+       };
 
        if (cppoff)
                return;
        next();
-       if (!strcmp(yytext, "GCC") && warnings) {
-               for (; *p; p++)
-                       putc(*p, stderr);
-       }
+       if (!strcmp(yytext, "GCC"))
+               warn(magic);
        warn("ignoring pragma '%s'", input->begin);
        *input->p = '\0';
        next();

Reply via email to