diff options
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 56ed9574bb9..687375f517c 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -1051,7 +1051,9 @@ int count_error (warningp) int warningp; { - if (warningp && inhibit_warnings) + if (warningp + && (inhibit_warnings + || (in_system_header && !warn_system_headers))) return 0; if (warningp && !warnings_are_errors) |