[hackers] [scc] [cc1] Simplify pragma() message printing || Roberto E. Vargas Caballero
commit c0e2b0c3d1aac699ef0484f9f56884eb48ea9cde
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri May 13 14:57:18 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -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();
Received on Fri May 13 2016 - 14:58:07 CEST
This archive was generated by hypermail 2.3.0
: Fri May 13 2016 - 15:00:14 CEST