aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpperror.c
diff options
context:
space:
mode:
authorNeil Booth <neilb@earthling.net>2000-09-28 05:55:22 +0000
committerNeil Booth <neil@gcc.gnu.org>2000-09-28 05:55:22 +0000
commitd8090680186229102bf95754d5117c9f3fb139fa (patch)
treee397904d152d2097125d59904f15ea71e0957eb9 /gcc/cpperror.c
parente93eff9433088e058245212256b3f03f34562817 (diff)
downloadgcc-d8090680186229102bf95754d5117c9f3fb139fa.zip
gcc-d8090680186229102bf95754d5117c9f3fb139fa.tar.gz
gcc-d8090680186229102bf95754d5117c9f3fb139fa.tar.bz2
cpperror.c (_cpp_begin_message): Do the test for suppression of warnings and pedantic warnings before the "is a...
* cpperror.c (_cpp_begin_message): Do the test for suppression of warnings and pedantic warnings before the "is a warning an error" tests. * cppinit.c (cpp_handle_option): Remove surplus \n. * cpplex.c (ON_REST_ARG): Delete. (skip_block_comment): Initialise prevc. (parse_args): Improve error messages. (maybe_paste_with_next): Use CONTEXT_VARARGS rather than ON_REST_ARG. * cpplib.c (cpp_push_buffer): Fix grammar in message. * cppmain.c (main): Set callbacks for #ident and #pragma only if no_output option is false. (do_pragma_implementation): Only call the #pragma handler if it is set in the cpp_reader structure. From-SVN: r36655
Diffstat (limited to 'gcc/cpperror.c')
-rw-r--r--gcc/cpperror.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/cpperror.c b/gcc/cpperror.c
index 0d6dbfb..fa44708 100644
--- a/gcc/cpperror.c
+++ b/gcc/cpperror.c
@@ -120,11 +120,12 @@ _cpp_begin_message (pfile, code, file, line, col)
switch (code)
{
case WARNING:
+ if (CPP_IN_SYSTEM_HEADER (pfile)
+ && ! CPP_OPTION (pfile, warn_system_headers))
+ return 0;
if (! CPP_OPTION (pfile, warnings_are_errors))
{
- if (CPP_OPTION (pfile, inhibit_warnings)
- || (CPP_IN_SYSTEM_HEADER (pfile)
- && ! CPP_OPTION (pfile, warn_system_headers)))
+ if (CPP_OPTION (pfile, inhibit_warnings))
return 0;
is_warning = 1;
}
@@ -138,11 +139,12 @@ _cpp_begin_message (pfile, code, file, line, col)
break;
case PEDWARN:
+ if (CPP_IN_SYSTEM_HEADER (pfile)
+ && ! CPP_OPTION (pfile, warn_system_headers))
+ return 0;
if (! CPP_OPTION (pfile, pedantic_errors))
{
- if (CPP_OPTION (pfile, inhibit_warnings)
- || (CPP_IN_SYSTEM_HEADER (pfile)
- && ! CPP_OPTION (pfile, warn_system_headers)))
+ if (CPP_OPTION (pfile, inhibit_warnings))
return 0;
is_warning = 1;
}