From nobody Wed May 11 00:30:10 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 46CD71AE4EC7; Wed, 11 May 2022 00:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KybQq0ngHz4p0f; Wed, 11 May 2022 00:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652229011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c36lJFBw/rdt9Z9YtbpOG7MLAsyYgy4ThgFYNd0afIc=; b=dkxXiRRw1nWk7Q1yHu4+7+pW1b0vOU2JJI9v2pS4LJj2pPSE7pBN0WntrDF2axBhJqxLi5 ckFlQMkLcQj0g92Xos/CwFmLOKULV4wkokOBXtr4lOZazF6Mjqz+cxvDZBzFn4G87pJM+g UCNpXv6vWRl98x8ewqRm5KYe49hqm/uYDFuZ9y4iY4h/RbWPZxVI4iUv5FJlQnl8sc7RFR 2Bu7hM272Y8lNKV1x8EHbf1oIuh1psa4lzEy6G/QVKZqvqvGDiTHS7aO8INQIISfPkkZFT xTd4MZ5u351fFLMMcNMgSwVs5TgElH6zcLLSZ7aduCsHjue+MmrSEfCX/nYPeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89D7479A1; Wed, 11 May 2022 00:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24B0UA2I057756; Wed, 11 May 2022 00:30:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24B0UAea057753; Wed, 11 May 2022 00:30:10 GMT (envelope-from git) Date: Wed, 11 May 2022 00:30:10 GMT Message-Id: <202205110030.24B0UAea057753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 05b766ab84a9 - stable/13 - Disable -Wreturn-type on GCC. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 05b766ab84a9d968984c8a4df127841c0df966f7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652229011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c36lJFBw/rdt9Z9YtbpOG7MLAsyYgy4ThgFYNd0afIc=; b=N4k8n8zbO3INgDV6nzb1KVUmqICe6AWhde/+5Fqj/+YMBDXwfNNNQSNziK7enxKnZcO/7W iff08RgQ1rVdYWS/LKHWYo8V+kPyWjJDZ8GKCX1/q+A8z20nkPtrUKR9TwF6kd4K4zEt1l +QXpRmPqFlq35/t0EJlGj7hdNrHrM+Bp4ww4/r22QdecvJs+d10b2r8Ssb2KIppTONJ4dl z/WURwtzB7JTdr7MrBXhkTYaHxylPke3Vbs1raEDE5JZjLI27Y5RvuYvtbHQkUmN7Ayrf/ grWuuWafsFCEdPVzh/cDYM3VTikd0yzxM1Gm3pj8sLVkzoFjEQJAcIft+ZiupQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652229011; a=rsa-sha256; cv=none; b=KbUM4Z4YAhcM1nbL0tWwzVhT2Q5nIt9RuxcknmGXpZFf0n9Q6mne5HZbUYZZ6c9UkT6wxm YrCp64ZR1kSY6HTC7iWZOxOYHTttuutTU6cA/QYmQYUv5yf6zL1ilLUqcJuwkTCtz/G76C r457FcNfQhk37jffFbmCpu8NFPwyi7hxBp02dVBg6cZVJTEyLBF2w42pwZPRZL+x3vgm+C bL7EFxIUdsZfiAx8Ng/1Z9fhZmwB7qxhZW9Qs7rQnmH8XaefzFAtVjcsPphZy6vIvr8j2z d3D8sYxTB7k58NJroyVVHm8+yfXCbiGmXziFII/wCQq/19h8nMoK5C9Bp7YCzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=05b766ab84a9d968984c8a4df127841c0df966f7 commit 05b766ab84a9d968984c8a4df127841c0df966f7 Author: John Baldwin AuthorDate: 2022-02-14 19:48:47 +0000 Commit: John Baldwin CommitDate: 2022-05-11 00:11:44 +0000 Disable -Wreturn-type on GCC. GCC is more pedantic than clang about warning when a function doesn't handle undefined enum values (see GCC bug 87950). Clang's warning gives a more pragmatic coverage and should find any real bugs, so disable the warning for GCC rather than adding __unreachable annotations to appease GCC. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D34147 (cherry picked from commit 2f6a842484675bb8fe9fafd40d90c06f13e02403) --- share/mk/bsd.sys.mk | 4 ++++ sys/conf/kern.mk | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 50039a1f5f63..fefad7996eef 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -206,6 +206,10 @@ CWARNFLAGS+= -Wno-error=overflow .endif .endif +# GCC produces false positives for functions that switch on an +# enum (GCC bug 87950) +CWARNFLAGS+= -Wno-return-type + # GCC's own arm_neon.h triggers various warnings .if ${MACHINE_CPUARCH} == "aarch64" CWARNFLAGS+= -Wno-system-headers diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 34f3447b8572..be396d0c3706 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -75,6 +75,10 @@ CWARNEXTRA+= -Wno-error=packed-not-aligned CWARNEXTRA+= -Wno-address-of-packed-member \ -Wno-error=alloca-larger-than= .endif + +# GCC produces false positives for functions that switch on an +# enum (GCC bug 87950) +CWARNFLAGS+= -Wno-return-type .endif # gcc # This warning is utter nonsense