From 3ae8882e70ad3c33b7a27a8e521dca6c1d434f74 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 1 Dec 2023 08:10:13 +0100 Subject: 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. --- gcc/c/c-decl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/c/c-decl.cc') 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; -- cgit v1.1