From nobody Fri Apr 12 22:42:47 2024 X-Original-To: dev-commits-src-main@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 4VGWmS24tsz5GHyt; Fri, 12 Apr 2024 22:42:48 +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 4VGWmS0Tb6z4trm; Fri, 12 Apr 2024 22:42:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712961768; 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=dcJCG80XU2+t/uzssSpcKsMzgwkOO5Q/eFj0m5tg+7Y=; b=pjlRiUVCUvYHGvEBjXiWuQpmx86UWEIhn1V3HFMsaLhldVmTfwxSdRqnwzB7wilTclRezk jTdp79Fu2EeGcUbl0HOJjRAyLfQ04Ferwqgog1s1JAiux3p8UC9gj32rU7mIhvtLjrFUYm ZotqaSI+nyoIU196efr5FTO/oGIzt2oIOIVo5rkb5rwbMwtOYqjao9fXdZCe18/jt4Ur8M xdQGdc4eU8tGgUTwy2m8+H2VDkA3y7s2wB9Lo7oiItMeitWr0zgpXNpf2KDAoqFuUXL3Qp hhG76So+3a6GUkvx5DlFYj3g0C6bd+p142iBApMlu8qwXDj5N0M61XF0lU9CuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712961768; a=rsa-sha256; cv=none; b=yVVk7hEJjll+Ar1GPh2Gw1IQNs2IOtLth+3XyKlgR+s4XEZYbRbfPP04s3iJgIgsD3ItBu 7ysGKB8jGOMIuyaSQYdjlZUJiAG7QBZR7Sym4Jf/px+92u5S8SP3M64razWnCPlevIrnLE sOzbI//wex0W93MdNOjH14/6YIgqOyOyukl+bqgHGuF6cVnODvaK0BxEkhuPs4pa79c201 oIrAgLCUSWqRlIrbvGlJggFqmM5QTkpv5rHmZMp2i/ZzA9m4JHM9iJoCSXGWX2h7MOxLx/ zwrurzc+nlOCuik4qQDHcYjc1eAVeFx3xxg3/k/vwN9SWQjrHrCebWSZ9bPuew== 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=1712961768; 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=dcJCG80XU2+t/uzssSpcKsMzgwkOO5Q/eFj0m5tg+7Y=; b=dsYLGRlmJa9H5THtYzr2VIudQYu8xNyi5/w3be9kWn+jC2//MXt4k/KBAzFahiJrnzASVn k/55BxO7CkR8jIrb8GO8tFMQSiUkdKDNEw1x8WAYr8vBeS2UCvOVtt1cQr4nJr4+TdqNnJ Au1qN5XnBuQLdveL23nEVHqLWF22m8y42nBuROMoWTGiggC6A4iZGFQYLXxYfTzhtsKKqP AyWY/zgssFsLfYeR+Ww6T8ekeYiOLrwgCJTDtQqlCwu2d/3+eytxOgpA/8HT8VzF5S7bX0 q0f3bk2VzU1U39EXLdjY0THtedHaho7L4onlnEiTV+NYNne+xpwHlV4Ps3o1kw== 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 4VGWmS06HHz16Rj; Fri, 12 Apr 2024 22:42:48 +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 43CMglgA034665; Fri, 12 Apr 2024 22:42:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43CMglcM034662; Fri, 12 Apr 2024 22:42:47 GMT (envelope-from git) Date: Fri, 12 Apr 2024 22:42:47 GMT Message-Id: <202404122242.43CMglcM034662@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: f7a10a775259 - main - daemon: Prefer sys/cdefs.h __unreachable over the builtin List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@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: f7a10a7752592c0bec6e6ea377f3f6640e9ecfa5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f7a10a7752592c0bec6e6ea377f3f6640e9ecfa5 commit f7a10a7752592c0bec6e6ea377f3f6640e9ecfa5 Author: Collin Funk AuthorDate: 2024-04-12 22:38:18 +0000 Commit: Warner Losh CommitDate: 2024-04-12 22:39:18 +0000 daemon: 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/daemon/daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index bce215af75d1..dd3315dadee4 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -275,7 +275,7 @@ main(int argc, char *argv[]) break; case 'h': usage(0); - __builtin_unreachable(); + __unreachable(); default: usage(1); }