From patchwork Fri Dec 1 15:54:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 172547 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1221862vqy; Fri, 1 Dec 2023 07:54:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGydj9qusWaK8JmeccRc3lG/kfJFnUBwRkyPyeDhwnzvzTOdUaXq2o1lAQ5Uh8L1vnh9X6a X-Received: by 2002:a05:622a:1a0e:b0:418:fab:2d31 with SMTP id f14-20020a05622a1a0e00b004180fab2d31mr27458597qtb.4.1701446095034; Fri, 01 Dec 2023 07:54:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701446095; cv=pass; d=google.com; s=arc-20160816; b=wYo5gBZqj+UA0pHSWjljbl5vBU7nSRVnTLifGJH1RCTztX8lCU12NOt4LCzIS4cvxR CIBdT86f1Ucs+0/TwHIRMHl4zYO0vFdGZVV4UAkQ1rHyXuRKjqrVXD16CSGTc5iEeWlM uISDejBDOi8yON83kB9rSkSusyMS27Zaf2H1ikmIF8sAUZgUS9HZC3tF3grbxwE7FKZN 1xRU3kAtsXqUozcAAjUEpBGA7rR3ZzQScjc6CtN9U6dX5hoCSl4v6vZgcVBM2pgEXAPd qhmXNBMbJRF02aAOLqYe4L41F6ja5LTFtf0Lnw3gmg0xizK8JqIW25JfBnyqa3V6QyCC c68w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:in-reply-to:subject:to:from:ironport-sdr :arc-filter:dmarc-filter:delivered-to; bh=jYA0RkXx55IUb2/66JoONrSn7r7jHenon1dwGgzD9YA=; fh=52jRZNNzjVJmTPgEn0LfkimL6a6zLIKgI5peG8tWr54=; b=EpRZt/5g42sPtxeWlzAOwPSKDx8vxGFKZTG4fzDBbk4gqVBy1siOWSZ8v697gxU50F 4CEqNsqNV8phbCpK9l7wEWXG62rg44vBFCE7OoerIRNCrBrqwguAmrg+QaNqt8xGTnVv 2sR80j64BFE/Sx4gB7y+ZNBuXc6cxKRAnGkHu8ger7v+tYM+XOW+jJ3Lz5ITCEe52H13 C1+crB+c5oNlWyNc+bd6TEOz2TSvTk4lB0jGrh/VZyk1Y17lnuPv1drd7jpDXt30uZaY fGz2/BFNnFZapv2Kn0CGw4utEBmfV73atO7twO1QXifjeJT/LMeg85wASRz4kVGVxKgn +BTQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id bb26-20020a05622a1b1a00b0042395bfaa25si3615524qtb.221.2023.12.01.07.54.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 07:54:55 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CA446385C41D for ; Fri, 1 Dec 2023 15:54:54 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id B9E383858415 for ; Fri, 1 Dec 2023 15:54:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B9E383858415 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B9E383858415 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.252 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701446071; cv=none; b=jW9XkUY5u9QMg/IS95OcMiJeGG2/t5JbeS1LGFhPT7zB55peXuBakDRaNqquhrZe0Vki7KLr3JTGmBXNgLBrWHDzmAuI25xjxZkyuMxzDFsGAlf9oXwaf14jCiON+kwyi+LIVCanSkzcCoyI7ci9AoiVh/ZyAmIoyIVGK9Skuq4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701446071; c=relaxed/simple; bh=fun6F8sfFBWhqD+nP1RfajJQe2HDl0ZfA2VB3Dp7YpI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=wTxDEubtbwPnxIN9PDavg1c9qaoRmk75I1r5VdWkyJG3Z5s2teyPG2Fd+btOsm9x21QJ70XNmtRHbowKyzo6x4rTmGP2OaJmOhXhp+QijxZoE9PAfbXqhG4wYB0uc5LKuE+0NpUTiQHf+b7bw7wBLcBunCO4EFteaFhIKuy5h9k= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: K94Uv1KzRveKH6w7Yb1VVg== X-CSE-MsgGUID: uEKNHqzbRjykQ8JWlvysbQ== X-IronPort-AV: E=Sophos;i="6.04,241,1695715200"; d="scan'208,223";a="24204103" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 01 Dec 2023 07:54:26 -0800 IronPort-SDR: Ni4EKNByFmQFM2u1WNVz3tMX4kzyha9me9mkWZXGIJzhBiqPyFFOAbMwv01wQ6B70s8LsnxOy+ PX8d3s560Xdd87SrkXJy3s/1J3USaiEvwiVYFTzI3PJVrf8bUEQh1X/CDrw+s+g1wAbgOwLq6q VUoySykqWfh0AB/vvafHzO4omyf+zwxbKC08m4yNw23A4BorExkZMC9uwlHc7q/NlThTLrrDsW obbWNyJiP4xgk5kBeQ83S9dr/YRhaaxvlzJpXw5armFXg/GcEoknIZLMFEHYsudQ0C0kcizzJ1 h+M= From: Thomas Schwinge To: Florian Weimer , , "Joseph Myers" Subject: 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) In-Reply-To: <1f9c86b42e3c99ba679df6282f6c28f359c3f4ec.1700473918.git.fweimer@redhat.com> References: <1f9c86b42e3c99ba679df6282f6c28f359c3f4ec.1700473918.git.fweimer@redhat.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Fri, 1 Dec 2023 16:54:18 +0100 Message-ID: <87fs0luded.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784095540834584366 X-GMAIL-MSGID: 1784095540834584366 Hi! On 2023-11-20T10:56:16+0100, Florian Weimer wrote: > --- a/gcc/c/c-decl.cc > +++ b/gcc/c/c-decl.cc > @@ -3515,14 +3515,14 @@ implicit_decl_warning (location_t loc, tree id, tree olddecl) > { > gcc_rich_location richloc (loc); > richloc.add_fixit_replace (suggestion); > - warned = pedwarn (&richloc, OPT_Wimplicit_function_declaration, > - "implicit declaration of function %qE;" > - " did you mean %qs?", > - id, suggestion); > + warned = permerror_opt (&richloc, OPT_Wimplicit_function_declaration, > + "implicit declaration of function %qE;" > + " did you mean %qs?", > + id, suggestion); > } > else > - warned = pedwarn (loc, OPT_Wimplicit_function_declaration, > - "implicit declaration of function %qE", id); > + warned = permerror_opt (loc, OPT_Wimplicit_function_declaration, > + "implicit declaration of function %qE", id); > } There's one more test case to adjust, for the more limited back ends (here: 'target { ! dfp }'). OK to push the attached "c: Turn -Wimplicit-function-declaration into a permerror: Fix 'gcc.dg/gnu23-builtins-no-dfp-1.c'"? 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 From 35ecfb7264bc93dbf2a5b2ee0a2d23a881fd6ded Mon Sep 17 00:00:00 2001 From: Thomas Schwinge 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] [...] Adjust as obvious. gcc/testsuite/ * gcc.dg/gnu23-builtins-no-dfp-1.c: 'dg-error "implicit"' instead of 'dg-warning "implicit"'. --- gcc/testsuite/gcc.dg/gnu23-builtins-no-dfp-1.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 9fa25f0dd13..7cb200fce6a 100644 --- a/gcc/testsuite/gcc.dg/gnu23-builtins-no-dfp-1.c +++ b/gcc/testsuite/gcc.dg/gnu23-builtins-no-dfp-1.c @@ -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