diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2023-12-01 16:52:06 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2023-12-05 10:29:49 +0100 |
commit | a1adce82c17577aeaaf6b9736ca8a1455d1164cb (patch) | |
tree | 1987d05d68af87e601e499f54d66418b5fafc584 /gcc | |
parent | e9d2ae6b9816e61a6148040149c63faa83f54702 (diff) | |
download | gcc-a1adce82c17577aeaaf6b9736ca8a1455d1164cb.zip gcc-a1adce82c17577aeaaf6b9736ca8a1455d1164cb.tar.gz gcc-a1adce82c17577aeaaf6b9736ca8a1455d1164cb.tar.bz2 |
c: Turn -Wimplicit-function-declaration into a permerror: Fix 'gcc.dg/gnu23-builtins-no-dfp-1.c'
With recent commit 55e94561e97ed0bce4774aa1c6b5d5d82209a379
"c: Turn -Wimplicit-function-declaration into a permerror", this test
case, added in 2019 commit 5b8d9367684f266c30c280b4d3c98830a88c70ab
"Prevent all uses of DFP when unsupported (PR c/91985)" started FAILing
(for applicable configurations):
[-PASS:-]{+FAIL:+} gcc.dg/gnu23-builtins-no-dfp-1.c (test for warnings, line 13)
[-PASS:-]{+FAIL:+} gcc.dg/gnu23-builtins-no-dfp-1.c (test for warnings, line 14)
[-PASS:-]{+FAIL:+} gcc.dg/gnu23-builtins-no-dfp-1.c (test for warnings, line 15)
[-PASS:-]{+FAIL:+} gcc.dg/gnu23-builtins-no-dfp-1.c (test for warnings, line 16)
[-PASS:-]{+FAIL:+} gcc.dg/gnu23-builtins-no-dfp-1.c (test for warnings, line 17)
[-PASS:-]{+FAIL:+} gcc.dg/gnu23-builtins-no-dfp-1.c (test for warnings, line 18)
[-PASS:-]{+FAIL:+} gcc.dg/gnu23-builtins-no-dfp-1.c (test for excess errors)
This is due to:
[...]/gcc.dg/gnu23-builtins-no-dfp-1.c:13:13: error: implicit declaration of function '__builtin_fabsd32'; did you mean '__builtin_fabsf32'? [-Wimplicit-function-declaration]
[...]
Specifying '-fpermissive', commit f37744662cbc74efcceb790b99dcd6521c51a578
"[committed] Fix gnu23-builtins-no-dfp" subsequently resolved the FAILs, but
patch review concluded that for this test case it's secondary *how*
"implicit declaration of function" is diagnosed, so we'd test the standard
way, which instead of "warning" now is "error".
gcc/testsuite/
* gcc.dg/gnu23-builtins-no-dfp-1.c: Remove '-fpermissive'.
'dg-error "implicit"' instead of 'dg-warning "implicit"'.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/gnu23-builtins-no-dfp-1.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/testsuite/gcc.dg/gnu23-builtins-no-dfp-1.c b/gcc/testsuite/gcc.dg/gnu23-builtins-no-dfp-1.c index 8fe4efb..7cb200f 100644 --- a/gcc/testsuite/gcc.dg/gnu23-builtins-no-dfp-1.c +++ b/gcc/testsuite/gcc.dg/gnu23-builtins-no-dfp-1.c @@ -1,7 +1,7 @@ /* Test C23 built-in functions: test DFP built-in functions are not available when no DFP support. Bug 91985. */ /* { dg-do compile { target { ! dfp } } } */ -/* { dg-options "-std=gnu23 -fpermissive" } */ +/* { dg-options "-std=gnu23" } */ int fabsd32 (void); int fabsd64 (void); @@ -10,9 +10,9 @@ int nand32 (void); int nand64 (void); int nand128 (void); -__typeof__ (__builtin_fabsd32 (0)) d32; /* { dg-warning "implicit" } */ -__typeof__ (__builtin_fabsd64 (0)) d64; /* { dg-warning "implicit" } */ -__typeof__ (__builtin_fabsd128 (0)) d128; /* { dg-warning "implicit" } */ -__typeof__ (__builtin_nand32 (0)) d32n; /* { dg-warning "implicit" } */ -__typeof__ (__builtin_nand64 (0)) d64n; /* { dg-warning "implicit" } */ -__typeof__ (__builtin_nand128 (0)) d128n; /* { dg-warning "implicit" } */ +__typeof__ (__builtin_fabsd32 (0)) d32; /* { dg-error "implicit" } */ +__typeof__ (__builtin_fabsd64 (0)) d64; /* { dg-error "implicit" } */ +__typeof__ (__builtin_fabsd128 (0)) d128; /* { dg-error "implicit" } */ +__typeof__ (__builtin_nand32 (0)) d32n; /* { dg-error "implicit" } */ +__typeof__ (__builtin_nand64 (0)) d64n; /* { dg-error "implicit" } */ +__typeof__ (__builtin_nand128 (0)) d128n; /* { dg-error "implicit" } */ |