From d8090680186229102bf95754d5117c9f3fb139fa Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 28 Sep 2000 05:55:22 +0000 Subject: 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 --- gcc/cpperror.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gcc/cpperror.c') 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; } -- cgit v1.1