diff options
author | Florian Weimer <fweimer@redhat.com> | 2023-12-01 08:10:13 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2023-12-01 08:10:13 +0100 |
commit | 3ae8882e70ad3c33b7a27a8e521dca6c1d434f74 (patch) | |
tree | 3f21e1bc31549de4fd8cd758424c9ff3cc62cc02 /gcc/testsuite | |
parent | 4ee2aca7ca098cc6e622a9a41e63224af37e6532 (diff) | |
download | gcc-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/testsuite')
-rw-r--r-- | gcc/testsuite/gcc.dg/permerror-system.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/permerror-system.c b/gcc/testsuite/gcc.dg/permerror-system.c index 60c65ff..cad48c9 100644 --- a/gcc/testsuite/gcc.dg/permerror-system.c +++ b/gcc/testsuite/gcc.dg/permerror-system.c @@ -10,7 +10,12 @@ /* { dg-error "'f1' \\\[-Wimplicit-function-declaration\\\]" "" { target *-*-* } 10 } */ +/* { dg-error "'implicit_int_1' \\\[-Wimplicit-int\\\]" "" { target *-*-* } 13 } */ +/* { dg-error "'implicit_int_2' \\\[-Wimplicit-int\\\]" "" { target *-*-* } 14 } */ +/* { dg-error "'implicit_int_3' \\\[-Wimplicit-int\\]" "" { target *-*-* } 15 } */ +/* { dg-error "return type defaults to 'int' \\\[-Wimplicit-int\\\]" "" { target *-*-* } 16 } */ /* { dg-error "type of 'i' defaults to 'int' \\\[-Wimplicit-int\\\]" "" { target *-*-*} 16 } */ +/* { dg-error "type defaults to 'int' in type name \\\[-Wimplicit-int\\\]" "" { target *-*-* } 19 } */ /* { dg-error "pointer/integer type mismatch in conditional expression \\\[-Wint-conversion\\\]" "" { target *-*-* } 29 } */ /* { dg-error "pointer/integer type mismatch in conditional expression \\\[-Wint-conversion\\\]" "" { target *-*-* } 30 } */ |