scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit c0e2b0c3d1aac699ef0484f9f56884eb48ea9cde
parent e1ed7494db4299f2e7adf1c02e3e9b5e61d7199f
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 13 May 2016 14:57:18 +0200

[cc1] Simplify pragma() message printing

There is no need of printing character by character when you
can print the full string at once.

Diffstat:
cc1/cpp.c | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git 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();