diff options
author | Doug Evans <dje@gnu.org> | 1994-05-31 23:15:01 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1994-05-31 23:15:01 +0000 |
commit | 22d7456253280138d3fae2753cf8d862e1442809 (patch) | |
tree | 947c379e1f01662310ce3ca3c73ce8fea7f4be77 /gcc | |
parent | 2bee044942515a73cab6f6f71593cc145235a132 (diff) | |
download | gcc-22d7456253280138d3fae2753cf8d862e1442809.zip gcc-22d7456253280138d3fae2753cf8d862e1442809.tar.gz gcc-22d7456253280138d3fae2753cf8d862e1442809.tar.bz2 |
(v_pedwarn_with_decl): Don't even issue warnings from
pedantic errors in system header files.
From-SVN: r7398
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/toplev.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 809d847..0cdc520 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1560,14 +1560,16 @@ v_pedwarn_with_decl (decl, s, ap) "errors" in system header files. Sometimes fixincludes can't fix what's broken (eg: unsigned char bitfields - fixing it may change the alignment which will cause programs to mysteriously fail because the C library - or kernel uses the original layout). + or kernel uses the original layout). There's no point in issuing a + warning either, it's just unnecessary noise. */ - ??? In fact, we may wish not to issue any message in this case. */ - - if (flag_pedantic_errors && ! DECL_IN_SYSTEM_HEADER (decl)) - v_error_with_decl (decl, s, ap); - else - v_warning_with_decl (decl, s, ap); + if (! DECL_IN_SYSTEM_HEADER (decl)) + { + if (flag_pedantic_errors) + v_error_with_decl (decl, s, ap); + else + v_warning_with_decl (decl, s, ap); + } } void |