From nobody Fri Apr 12 22:42:49 2024 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 4VGWmT3v5Xz5GHj8; Fri, 12 Apr 2024 22:42:49 +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 4VGWmT1DtNz4tnx; Fri, 12 Apr 2024 22:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712961769; 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=NJOaIW/W5kxO6CbYC2cIWIaoXBzLb5XbgZQkK+p/IFE=; b=qPjXeGo3Slmf+8yC0/qGoF+2GG/EDFQow3zfBBOWSLG+szKOyR9zcRJcvMJo3RVca+VyOH q01VXbl4JyYd2XWBhn0qFwNlSMqPzhah7skeh36jawtivS2aK1vUPPfjnEEl4e4BL0bPBe 207EVoAUaZyKtySnlWu1yGwMRKeegD6XT3xdilreh5dJ4/JhyZ3og4m1Ln+atH5ZaUAm/i so3yfp6uYkU3fsp+WkxFS4PUZmnGg8HnMs3FL2BreBdH2swP1owJwwpfSk0mMEYjzJwFtL i4jg1VkMRZe5IGoZE0fBY5pRTHd4Bg0vO3VizAnkCQeyV+j8xD2TcvVnSzZKjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712961769; a=rsa-sha256; cv=none; b=Q0qohNoS/l2Z3k+fM//OvziAwZuI7Sxkxg2c0Q+6ddk+m94GdmqAJIuE+XiZRC8aCR2GmL gZdMNhr0NdKY4OlLzH8uuDpl0+jxebxl7HcivGI77BU6WP3YYyWx6NHsNLBM8ekTm7jQXX 8dVC4MQ6vqwMoka4dOMrKDX4OWt2rWLpu61m9hi6/czSNzARfkBUzEpUnH+49aXXjhHLmy cd693w+wQGitAzjUjA+IfscxzPJ8K7ILJtRdldlh0zVr+sOvPyEEqHYTx0SYEjbgihnSnZ 6Hb8Cpc6oNeI3XcxZhMtnlA+X9+MCm5b6N+e4LwZ63cfijOgt31aE8v2huxMVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712961769; 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=NJOaIW/W5kxO6CbYC2cIWIaoXBzLb5XbgZQkK+p/IFE=; b=ijhRxHXVyYILvvUNOtoCVyZ35BtGbqtLf/l6/lr3AwULlN1qH53xLDj2eRe2gSj2dd2RPU zrj5rAlTAu4si/GwmMyK7kKQV2jHa6z2q1zDuR+1YGDLSNryAKX23bbGpH11yRvENNXXiR SEFl45SG/WH8wpiuKs7zdfxNzWlQUYOl80B2UMFlzVkUma8lqIpiBnbiN9ronqRrL6tmKE Rm3l32I69aizVinCdKCdOtx6yFnzS+MBhbM5/7pHUwjWwIfSBPKVj2q3ihB76JHpscAFOo h2LQPpN9ekayly8MJ/288a7opjxeHccaHp/BiF/jz+/T4vzhlgaWS4ayyD6glA== 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 4VGWmT0q6fz16sk; Fri, 12 Apr 2024 22:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43CMgniB034716; Fri, 12 Apr 2024 22:42:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43CMgnwt034713; Fri, 12 Apr 2024 22:42:49 GMT (envelope-from git) Date: Fri, 12 Apr 2024 22:42:49 GMT Message-Id: <202404122242.43CMgnwt034713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 52a19a90de6a - main - kldxref: Prefer sys/cdefs.h __unreachable over the builtin 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: 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52a19a90de6a5ad43e68742a477796580b69fb99 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=52a19a90de6a5ad43e68742a477796580b69fb99 commit 52a19a90de6a5ad43e68742a477796580b69fb99 Author: Collin Funk AuthorDate: 2024-04-12 22:38:19 +0000 Commit: Warner Losh CommitDate: 2024-04-12 22:39:25 +0000 kldxref: Prefer sys/cdefs.h __unreachable over the builtin The __builtin_unreachable macro provided by Clang and GCC is a hint to the compiler used for optimization. The programs work fine even if the compiler doesn't support it. The sys/cdefs.h has had __unreachable for 9 years (commit 732b31de5d9244bd1cc98192e09ee1881e9f55e9). It expands to the builtin if it is available. In the rare case that it is unsupported it expands to a null statement so compilation does not fail. Signed-off-by: Collin Funk Reviewed by: imp, freebsd@igalic.co Pull Request: https://github.com/freebsd/freebsd-src/pull/1117 --- usr.sbin/kldxref/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/kldxref/elf.c b/usr.sbin/kldxref/elf.c index a93cf996ccc7..f98c39b69c0b 100644 --- a/usr.sbin/kldxref/elf.c +++ b/usr.sbin/kldxref/elf.c @@ -532,7 +532,7 @@ elf_address_from_pointer(struct elf_file *efile, const void *p) else return (be64dec(p)); default: - __builtin_unreachable(); + __unreachable(); } }