From: Thomas Schwinge <thomas@codesourcery.com>
To: Jeff Law <jeffreyalaw@gmail.com>,
Florian Weimer <fw@deneb.enyo.de>,
Joseph Myers <joseph@codesourcery.com>, <gcc-patches@gcc.gnu.org>
Subject: [v2] c: Turn -Wimplicit-function-declaration into a permerror: Fix 'gcc.dg/gnu23-builtins-no-dfp-1.c' (was: [committed] Fix gnu23-builtins-no-dfp)
Date: Tue, 5 Dec 2023 10:31:43 +0100 [thread overview]
Message-ID: <871qc15728.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <5f1eb4d5-d168-4ce9-8eb8-39644206fff3@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]
Hi!
On 2023-12-03T13:57:36-0700, Jeff Law <jeffreyalaw@gmail.com> wrote:
> On 12/3/23 05:23, Thomas Schwinge wrote:
>> On 2023-12-03T08:41:59+0100, Florian Weimer <fw@deneb.enyo.de> wrote:
>> <https://inbox.sourceware.org/87fs0luded.fsf@euler.schwinge.homeip.net>
>> "c: Turn -Wimplicit-function-declaration into a permerror: Fix 'gcc.dg/gnu23-builtins-no-dfp-1.c'",
>> awaiting review. Rationale: For this test case it's secondary *how*
>> "implicit declaration of function" is diagnosed, so I'd test the standard
>> way, which instead of "warning" now is "error". (But no strong feelings
>> either way.) ;-)
> Sorry, I missed your fix.
No worries.
> I like it better then mine. Approved, along
> with reverting my bits.
Pushed to master branch commit a1adce82c17577aeaaf6b9736ca8a1455d1164cb
"c: Turn -Wimplicit-function-declaration into a permerror: Fix 'gcc.dg/gnu23-builtins-no-dfp-1.c'",
see attached.
Grüße
Thomas
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-c-Turn-Wimplicit-function-declaration-into-a-permerr.patch --]
[-- Type: text/x-diff, Size: 3508 bytes --]
From a1adce82c17577aeaaf6b9736ca8a1455d1164cb Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Fri, 1 Dec 2023 16:52:06 +0100
Subject: [PATCH] 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"'.
---
gcc/testsuite/gcc.dg/gnu23-builtins-no-dfp-1.c | 14 +++++++-------
1 file 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 8fe4efbdd98..7cb200fce6a 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" } */
--
2.34.1
next prev parent reply other threads:[~2023-12-05 9:31 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 9:55 [PATCH v3 00/11] : More warnings as errors by default Florian Weimer
2023-11-20 9:55 ` [PATCH v3 01/11] aarch64: Avoid -Wincompatible-pointer-types warning in Linux unwinder Florian Weimer
2023-11-22 23:24 ` Joseph Myers
2023-11-20 9:55 ` [PATCH v3 02/11] aarch64: Call named function in gcc.target/aarch64/aapcs64/ice_1.c Florian Weimer
2023-11-22 23:25 ` Joseph Myers
2023-11-20 9:55 ` [PATCH v3 03/11] gm2: Add missing declaration of m2pim_M2RTS_Terminate to test Florian Weimer
2023-11-22 23:28 ` Joseph Myers
2023-11-20 9:56 ` [PATCH v3 04/11] Add tests for validating future C permerrors Florian Weimer
2023-11-30 17:31 ` Marek Polacek
2023-11-30 17:37 ` Florian Weimer
2023-11-30 17:39 ` Marek Polacek
2023-11-30 18:25 ` Jakub Jelinek
2023-11-20 9:56 ` [PATCH v3 05/11] c: Turn int-conversion warnings into permerrors Florian Weimer
2023-11-30 19:04 ` Marek Polacek
2023-11-30 19:46 ` Florian Weimer
2023-11-20 9:56 ` [PATCH v3 06/11] c: Turn -Wimplicit-function-declaration into a permerror Florian Weimer
2023-11-30 19:15 ` Marek Polacek
2023-12-01 15:54 ` c: Turn -Wimplicit-function-declaration into a permerror: Fix 'gcc.dg/gnu23-builtins-no-dfp-1.c' (was: [PATCH v3 06/11] c: Turn -Wimplicit-function-declaration into a permerror) Thomas Schwinge
2023-12-03 5:55 ` [committed] Fix gnu23-builtins-no-dfp Jeff Law
2023-12-03 7:41 ` Florian Weimer
2023-12-03 12:23 ` Thomas Schwinge
2023-12-03 20:57 ` Jeff Law
2023-12-05 9:31 ` Thomas Schwinge [this message]
2024-04-09 11:40 ` [PATCH v3 06/11] c: Turn -Wimplicit-function-declaration into a permerror Sebastian Huber
2024-04-09 12:10 ` Sam James
2024-04-09 12:26 ` Sebastian Huber
2024-04-09 12:56 ` Sam James
2023-11-20 9:56 ` [PATCH v3 07/11] c: Turn -Wimplicit-int " Florian Weimer
2023-11-30 19:48 ` Marek Polacek
2023-11-20 9:56 ` [PATCH v3 08/11] c: Do not ignore some forms of -Wimplicit-int in system headers Florian Weimer
2023-11-30 19:53 ` Marek Polacek
2023-11-20 9:56 ` [PATCH v3 09/11] c: Turn -Wreturn-mismatch into a permerror Florian Weimer
2023-11-23 17:32 ` Marek Polacek
2023-11-23 18:22 ` Florian Weimer
2023-11-30 16:17 ` Marek Polacek
2023-11-20 9:56 ` [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types " Florian Weimer
2023-11-30 20:47 ` Marek Polacek
2023-11-30 21:02 ` Marek Polacek
2023-11-30 21:11 ` Florian Weimer
2023-11-30 21:15 ` Marek Polacek
2023-11-30 21:23 ` Jakub Jelinek
2023-11-30 21:27 ` Florian Weimer
2023-11-30 21:30 ` Jakub Jelinek
2023-11-30 21:36 ` Marek Polacek
2023-12-10 19:23 ` Jason Merrill
2023-12-05 9:37 ` Richard Earnshaw
2023-12-05 9:46 ` Florian Weimer
2023-12-05 10:11 ` Richard Earnshaw
2023-12-05 10:33 ` [PATCH] libgfortran: Fix -Wincompatible-pointer-types errors Jakub Jelinek
2023-12-05 10:47 ` Richard Earnshaw
2023-12-05 10:51 ` Jakub Jelinek
2023-12-05 10:57 ` Richard Earnshaw
2023-12-05 10:59 ` Jakub Jelinek
2023-12-05 17:35 ` Richard Earnshaw
2023-12-05 11:00 ` Florian Weimer
2023-12-05 13:35 ` Tobias Burnus
2023-12-06 12:04 ` [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror Prathamesh Kulkarni
2023-12-06 12:12 ` Florian Weimer
2023-11-20 9:56 ` [PATCH v3 11/11] c: Add new -Wdeclaration-missing-parameter-type permerror Florian Weimer
2023-11-20 19:12 ` Eric Gallager
2023-11-20 19:32 ` Florian Weimer
2023-11-30 21:10 ` Marek Polacek
2023-12-11 9:11 ` Florian Weimer
2023-11-23 0:54 ` [PATCH v3 00/11] : More warnings as errors by default Jeff Law
2023-11-23 1:04 ` Florian Weimer
2023-11-27 20:23 ` Sam James
2023-11-30 21:35 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qc15728.fsf@euler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=fw@deneb.enyo.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=joseph@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).