From nobody Mon Dec 29 23:48:57 2025 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 4dgCbt1p0Pz6MWNZ for ; Mon, 29 Dec 2025 23:48:58 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dgCbs56Qlz459g for ; Mon, 29 Dec 2025 23:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767052137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jt+eJS98wn0xPiCeyBlyG0NPdXbnzYAFpWrR6rH6m0A=; b=K6BYqIYk/d/Hq1JFY5h8c00MXpdbhrfpqRuJOobu0bTOZv70W7bY+3OVqd5qvuU6W6Kx4B u5JXooZmx+JFwuJJz2lL0885bgBqLr80+3O0X9c8yru+ZuqeGlsluhfCy/pOKzvUWh94MM p64cqjB4BrfrHRiFVXltKLOothT2AiscWNEgj2HJy4OOShc4FU8+TwJSe+ZdgK51jmSR9/ 20cnfP2imxAxYe8haQeZQkXrt8Dl1f0ixG61PGnpB0c6FWjQ2nsS7bG24F+Rn13cf9/Y8n jYCwu0qWRU9GRDU2V/mtYLZq46n9nxaRN0iyDTFv4ycKCBly9wuUsgc4Gemu7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767052137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jt+eJS98wn0xPiCeyBlyG0NPdXbnzYAFpWrR6rH6m0A=; b=XkUZn1OYk6h3DDkIzkJQlXKJ8EeBIY7tJ7FANaxjXv41yh2K/OpipIyg2g5vy1c+tgMkkM qt+5ByfpmKwFxoLP3hXkcIXXh+9iQ9iYJ2rEQ+z/ddjI9GlbZwPd+lrK8PcHx4W0pWGNFf GszqB8Jw3ZrmAZjSOe7PQbphpufpPA6Tgk6H9Ccab6LXFWDmRUgYY1NgUtnNBIRQV9mYQt Jz+HWTiSxK6CvxqyqNKUZ0t6l9PhRmyqRGeZJ7QwGaFw/TxZweX7YW3KBug7O9bRRCaOEA p8yAw74IF7puJnGW5FTJRxwkNHP4o+1kL/a3BFIF3pISZVs3M56EI9JqOHF75A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767052137; a=rsa-sha256; cv=none; b=YEwRu7esTeBWNqWTObx2eWESg+FrS55FiX6+91mnp1aUz+jWBQmaQQIVrt6i6HObTPLSzr UEdcXGwIbuqNzM+wYI2tsVQh4MUha3BFTy1eEx9Vu79ndGLq4SGysMW7ohdaK1eF/0wm7J jqe/s17Jdgx/LDJdZKAiHvQz4xUbAuNvldB9BwLCprhtyiKTPJa4IwnhfcFQu3VZ6Ov2pP eiBt2V3hxf3/y5W63W6PfRP8fP+zjCd4r16Rxwu682IL/VjXSLJVQrufi3FE7dr7bwAa7D ANnkTXBbXFLIUWk6yHaBD/Z6gg4nOxsTIrwoq/NyaZz8BN3oZ6Mc9KTIi2hKGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dgCbs3y8gzc9J for ; Mon, 29 Dec 2025 23:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 255c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 29 Dec 2025 23:48:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Lexi Winter From: Dimitry Andric Subject: git: cd2a65a60701 - stable/13 - sys/cdefs.h: add __noexcept and __noexcept_if 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 Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cd2a65a60701d806e8ebbf97b6c77c880e0c9746 Auto-Submitted: auto-generated Date: Mon, 29 Dec 2025 23:48:57 +0000 Message-Id: <69531369.255c8.54a75166@gitrepo.freebsd.org> The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cd2a65a60701d806e8ebbf97b6c77c880e0c9746 commit cd2a65a60701d806e8ebbf97b6c77c880e0c9746 Author: Lexi Winter AuthorDate: 2024-02-02 16:41:40 +0000 Commit: Dimitry Andric CommitDate: 2025-12-29 23:46:45 +0000 sys/cdefs.h: add __noexcept and __noexcept_if These macros provide the C++11 noexcept and noexcept(...) keywords if we're compiling in a C++11 environment. Otherwise, they expand to an empty string. This will be used to add the required noexcept specifier to several libc functions as required in C++11. MFC after: 2 weeks Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1085 (cherry picked from commit 02b0d4b688cc4deb14cb6e7534a2a4958e48b753) --- sys/sys/cdefs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 8fd07ce85a05..96a3742c4a1d 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -394,6 +394,17 @@ #endif #endif +/* + * noexcept keyword added in C++11. + */ +#if defined(__cplusplus) && __cplusplus >= 201103L +#define __noexcept noexcept +#define __noexcept_if(__c) noexcept(__c) +#else +#define __noexcept +#define __noexcept_if(__c) +#endif + /* * nodiscard attribute added in C++17 and C23, but supported by both LLVM and * GCC in earlier language versions, so we use __has_c{,pp}_attribute to test