summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2002-09-01 20:56:10 +0000
committerkan <kan@FreeBSD.org>2002-09-01 20:56:10 +0000
commit67f771a4b47476e8816141d889e5c328ed56b9d9 (patch)
treeaecec7bcb192343cfc16a95583a4d3794364fb2b /contrib/gcc
parent474d90c51c82574fae205a03f0fe6e4865b15498 (diff)
downloadFreeBSD-src-67f771a4b47476e8816141d889e5c328ed56b9d9.zip
FreeBSD-src-67f771a4b47476e8816141d889e5c328ed56b9d9.tar.gz
Merge FreeBSD modifications into gcc 3.2.1-prerelease:
1.2 don't let gcc(1) hide warnings in system headers. Approved by: obrien
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/c-lex.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/contrib/gcc/c-lex.c b/contrib/gcc/c-lex.c
index 589270f..3659872 100644
--- a/contrib/gcc/c-lex.c
+++ b/contrib/gcc/c-lex.c
@@ -340,20 +340,21 @@ cb_def_pragma (pfile, line)
-Wunknown-pragmas has been given. */
if (warn_unknown_pragmas > in_system_header)
{
- const unsigned char *space, *name = 0;
+ const unsigned char *space, *name;
const cpp_token *s;
+ space = name = (const unsigned char *) "";
s = cpp_get_token (pfile);
- space = cpp_token_as_text (pfile, s);
- s = cpp_get_token (pfile);
- if (s->type == CPP_NAME)
- name = cpp_token_as_text (pfile, s);
+ if (s->type != CPP_EOF)
+ {
+ space = cpp_token_as_text (pfile, s);
+ s = cpp_get_token (pfile);
+ if (s->type == CPP_NAME)
+ name = cpp_token_as_text (pfile, s);
+ }
lineno = SOURCE_LINE (map, line);
- if (name)
- warning ("ignoring #pragma %s %s", space, name);
- else
- warning ("ignoring #pragma %s", space);
+ warning ("ignoring #pragma %s %s", space, name);
}
}
OpenPOWER on IntegriCloud