aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2023-12-01 08:10:13 +0100
committerFlorian Weimer <fweimer@redhat.com>2023-12-01 08:10:13 +0100
commit3ae8882e70ad3c33b7a27a8e521dca6c1d434f74 (patch)
tree3f21e1bc31549de4fd8cd758424c9ff3cc62cc02 /gcc/c
parent4ee2aca7ca098cc6e622a9a41e63224af37e6532 (diff)
downloadgcc-3ae8882e70ad3c33b7a27a8e521dca6c1d434f74.zip
gcc-3ae8882e70ad3c33b7a27a8e521dca6c1d434f74.tar.gz
gcc-3ae8882e70ad3c33b7a27a8e521dca6c1d434f74.tar.bz2
c: Do not ignore some forms of -Wimplicit-int in system headers
Most -Wimplicit-int warnings were unconditionally disabled for system headers. Only missing types for parameters in old-style function definitions resulted in warnings. This is inconsistent with the treatment of other permerrors, which are active in system headers. gcc/c/ * c-decl.cc (grokdeclarator): Do not skip -Wimplicit-int warnings or errors in system headers. gcc/testsuite/ * gcc.dg/permerror-system.c: Expect all -Wimplicit-int permerrors.
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/c-decl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc
index 14d66ff..8123924 100644
--- a/gcc/c/c-decl.cc
+++ b/gcc/c/c-decl.cc
@@ -6851,7 +6851,7 @@ grokdeclarator (const struct c_declarator *declarator,
/* Diagnose defaulting to "int". */
- if (declspecs->default_int_p && !in_system_header_at (input_location))
+ if (declspecs->default_int_p)
{
/* Issue a warning if this is an ISO C 99 program or if
-Wreturn-type and this is a function, or if -Wimplicit;