diff options
author | Chris Demetriou <cgd@sibyte.com> | 2001-01-23 19:20:14 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-01-23 19:20:14 +0000 |
commit | c933c209ddf06f94796eeba7d6df75a001bd87fc (patch) | |
tree | 94816158e7a49cde04f6917891aee5663ee49412 /gcc/cpperror.c | |
parent | c8f33f223b001f8d1bff29ce9920e45ea7400c29 (diff) | |
download | gcc-c933c209ddf06f94796eeba7d6df75a001bd87fc.tar.gz |
cpperror.c: Merge handlers of PEDWARN and WARNING.
* cpperror.c: Merge handlers of PEDWARN and WARNING.
Have -Werror make pedantic warnings errors, like the
rest of GCC.
Co-Authored-By: Neil Booth <neil@daikokuya.demon.co.uk>
From-SVN: r39206
Diffstat (limited to 'gcc/cpperror.c')
-rw-r--r-- | gcc/cpperror.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/gcc/cpperror.c b/gcc/cpperror.c index cfd4ce540f6..50bd9076dbd 100644 --- a/gcc/cpperror.c +++ b/gcc/cpperror.c @@ -154,42 +154,25 @@ _cpp_begin_message (pfile, code, file, pos) switch (code) { + case PEDWARN: 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)) - return 0; - is_warning = 1; - } - else + if (CPP_OPTION (pfile, warnings_are_errors) + || (code == PEDWARN && CPP_OPTION (pfile, pedantic_errors))) { if (CPP_OPTION (pfile, inhibit_errors)) return 0; if (pfile->errors < CPP_FATAL_LIMIT) pfile->errors++; } - break; - - case PEDWARN: - if (CPP_IN_SYSTEM_HEADER (pfile) - && ! CPP_OPTION (pfile, warn_system_headers)) - return 0; - if (! CPP_OPTION (pfile, pedantic_errors)) + else { if (CPP_OPTION (pfile, inhibit_warnings)) return 0; is_warning = 1; } - else - { - if (CPP_OPTION (pfile, inhibit_errors)) - return 0; - if (pfile->errors < CPP_FATAL_LIMIT) - pfile->errors++; - } break; case ERROR: |