From nobody Mon Feb 14 19:49:16 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 C8B3719CB2A0; Mon, 14 Feb 2022 19:49:16 +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 4JyFCw5LT7z4ZmC; Mon, 14 Feb 2022 19:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644868156; 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=lxe48PjbTOHbt1EP6lRLw8JYgX8pGn+6PWkAjY4geAs=; b=ML2aZuDCXn+cE5ubFJ9mMD4rT7Oo26O9gAtj1qOVW4Q30nuOVDTMBf6ARPtccRdO9kyQNx rWXNTKn2XdgRqoQPp7CBXpLsSBGSadW6n+PjHH7oYNYgjmXAGPE6HqitPlMZF7s4w0k/u5 xGZJcXolrAwNK3Ref1u9zEfnHxW6l3L1zUKPRindskmx8MLZaCgSgpo5CNG/VyqL79KWcK eRExzvLwSQTmpgM5xIfp+kBpcQeawjHlmd1zy7aIBKY58SyKVno5/ztTIT50bV5pOdy2LI WrXPFi8kLsW/ffmFj7ZWPHlfjojICJP27Q39Exu5MJJ7kNc8sFGbH6YUA4NAOg== 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 9792614C1D; Mon, 14 Feb 2022 19:49:16 +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 21EJnGVF036238; Mon, 14 Feb 2022 19:49:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21EJnGI0036237; Mon, 14 Feb 2022 19:49:16 GMT (envelope-from git) Date: Mon, 14 Feb 2022 19:49:16 GMT Message-Id: <202202141949.21EJnGI0036237@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 2f6a84248467 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 2f6a842484675bb8fe9fafd40d90c06f13e02403 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644868156; 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=lxe48PjbTOHbt1EP6lRLw8JYgX8pGn+6PWkAjY4geAs=; b=SauYPcBL5nh3JqieYS54M+vCK1Bnx92DvRJbUkX4bZ0WNh41zE+qxQtocKcU+SVaLfLLRX sqoGQqGPDSx9gwjBfKYx18hsvhIBROeHazY6hBnlFPBgcbg4kCUaL6Tfs5mRUzkulq0Y4L OZEQla9RLFRlkOiGgp37RiQ36wapNM6pfQBEgflkBfXP0SkIHEBm9ohatkpxbe3JWAEnsZ JDmK2y73fSowmyQGFRdcRWffeio2hl8M3oXa1yZkDcc9C3TnbD2yicvxXKUvnDEaCkLveT v/IaP61+tbzCFYhX3pW9b18EUrr3WXYunwp7PRFl63w6wurMjQRCk+FpeDFLuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644868156; a=rsa-sha256; cv=none; b=qUA7QuTx4W9CCeP+oqRToAlYfyWf/0+EDAZymH9AJ3GxnJDGvMJqPdv2vE/vd1y/CsX0Xn jUxx8F/VKpzWjzph3QwfyXU2pSPD/hmw+NS6x8/U9PP1GW8GnFlFfEuKB87ySCI9eo9NNn yh0C9roPHjyL75wtrCzqSNCpkDBzBhQzF+P8Vwu0458SDM22i9/5QLoSVPCiVRD3bHnU3I kyoWpdRr1vYvg4YxAzK+AJraMf0XyLCjU54Say8FomVfSo0k+1ma0e7qye7Kir+54Tkmfx GI+zrNl8ZAt2tOMxrrkLbAaR7XjhA6sSOdkfMaZctlSTS104UjghmsuTgQ7wJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2f6a842484675bb8fe9fafd40d90c06f13e02403 commit 2f6a842484675bb8fe9fafd40d90c06f13e02403 Author: John Baldwin AuthorDate: 2022-02-14 19:48:47 +0000 Commit: John Baldwin CommitDate: 2022-02-14 19:48:47 +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 --- 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 694cc66c3f18..cf48411d3d4d 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 4c497623bf7c..06a0c1272704 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