diff options
author | Jason Merrill <jason@casey.cygnus.com> | 2000-03-03 00:09:22 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-03-02 19:09:22 -0500 |
commit | 83ecd27e96299f3cbcf0421151884d3ea0a31b4a (patch) | |
tree | 6ae7469aecef9b478b6f1cf73428e74a1fc25072 /gcc/cpplib.c | |
parent | 3b18cdf955773fdf277d7ac5c571de1c6bc9cb0b (diff) | |
download | gcc-83ecd27e96299f3cbcf0421151884d3ea0a31b4a.zip gcc-83ecd27e96299f3cbcf0421151884d3ea0a31b4a.tar.gz gcc-83ecd27e96299f3cbcf0421151884d3ea0a31b4a.tar.bz2 |
cpplib.h (CPP_PEDANTIC): Only true if system_header_p is not set for the buffer.
* cpplib.h (CPP_PEDANTIC): Only true if system_header_p is not set
for the buffer.
(SET_CPP_PEDANTIC): New macro.
* cpplib.c (do_include): Don't bother checking system_header_p.
(do_warning, do_ident, do_assert, do_unassert): Likewise.
From-SVN: r32299
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r-- | gcc/cpplib.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index c5cf674..96f2ca9 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -1068,7 +1068,7 @@ do_include (pfile, keyword) int fd; - if (CPP_PEDANTIC (pfile) && !CPP_BUFFER (pfile)->system_header_p) + if (CPP_PEDANTIC (pfile)) { if (importing) cpp_pedwarn (pfile, "ANSI C does not allow `#import'"); @@ -1555,7 +1555,7 @@ do_warning (pfile, keyword) skip_rest_of_line (pfile); limit = CPP_BUFFER (pfile)->cur; - if (CPP_PEDANTIC (pfile) && !CPP_BUFFER (pfile)->system_header_p) + if (CPP_PEDANTIC (pfile)) cpp_pedwarn (pfile, "ANSI C does not allow `#warning'"); cpp_warning (pfile, "#warning %.*s", (int)(limit - text), text); @@ -1572,7 +1572,7 @@ do_ident (pfile, keyword) long old_written = CPP_WRITTEN (pfile); /* Allow #ident in system headers, since that's not user's fault. */ - if (CPP_PEDANTIC (pfile) && !CPP_BUFFER (pfile)->system_header_p) + if (CPP_PEDANTIC (pfile)) cpp_pedwarn (pfile, "ANSI C does not allow `#ident'"); CPP_PUTS (pfile, "#ident ", 7); @@ -2292,7 +2292,7 @@ validate_else (pfile, directive) cpp_reader *pfile; const char *directive; { - if (! CPP_PEDANTIC (pfile) || CPP_BUFFER (pfile)->system_header_p) + if (! CPP_PEDANTIC (pfile)) return; cpp_skip_hspace (pfile); @@ -3060,8 +3060,7 @@ do_assert (pfile, keyword) HASHNODE *base, *this; int baselen, thislen; - if (CPP_PEDANTIC (pfile) && CPP_OPTIONS (pfile)->done_initializing - && !CPP_BUFFER (pfile)->system_header_p) + if (CPP_PEDANTIC (pfile) && CPP_OPTIONS (pfile)->done_initializing) cpp_pedwarn (pfile, "ANSI C does not allow `#assert'"); cpp_skip_hspace (pfile); @@ -3125,8 +3124,7 @@ do_unassert (pfile, keyword) long baselen, thislen; HASHNODE *base, *this, *next; - if (CPP_PEDANTIC (pfile) && CPP_OPTIONS (pfile)->done_initializing - && !CPP_BUFFER (pfile)->system_header_p) + if (CPP_PEDANTIC (pfile) && CPP_OPTIONS (pfile)->done_initializing) cpp_pedwarn (pfile, "ANSI C does not allow `#unassert'"); cpp_skip_hspace (pfile); |