From nobody Fri Feb 02 18:16:58 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 4TRPB24Ynrz59CnZ; Fri, 2 Feb 2024 18:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TRPB241Hjz4flk; Fri, 2 Feb 2024 18:16:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706897818; 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=1mpvuzEQ0iRTO1ME4ecv8KqrSQXbIdPuFHlCNi9Ubw4=; b=UveuaU/Uifw9Jjqem5S+nuZBRK31CdxiP76OV8k/sOLg6mtqAj/s1u5Pj3zqbmf1n8JIQe 4k+KaAMNfvBBjOf1odgzXr4+CVYETYtaJgtZ+3JsgYgiV8fNQ3FnX3FsXR0ipUrn9WvKAD cZoqDaFXa3ouykc/m0UIbWDuw9gA9nVVxKYpRAS2dVCoDmCYNLnPOcF7UAwLi54zYQwMIe Iqx89di3ef2Ct0UnIJwirYAbCWkI6qzY2QzSs3mrr9c2C9rYaN/8qZNr49/Tche1WZousA ZH+iODMcbv/XPvT30LJ1mfGv1okvnpFN1k3xMTolq7D4vYDDrbCG4hSLG4ECpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706897818; 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=1mpvuzEQ0iRTO1ME4ecv8KqrSQXbIdPuFHlCNi9Ubw4=; b=dTwqMfISuKxkJfCL7VaUZbVPs34c1AcdN80zOIQuRIaK+CdY6IrXav4nqHTumqDMAWKMQA 6r9tkSXOEzjz1XJXZQlbZ9z6U2ZJvlXqgICYn04IBSNTzUiTA9rMN0QS9G8abEsMR3QpXO Dd/LVs2c90uRSMs7eNuilELqyCNM1XMW/o4XEe9Lb3TDv1ZV2pbfwdANV1tpamxgztqXvg KUFnyPUtW8vhrT6hY5WDFXIIGxwR87ewQ/zgugq7ucX61P9TewPJq1XcefERN58tqEcDc3 5LxHjYzxtf3LPlNPjCicMkrQ67ZlpWpnHkBQwpx1oQePCL8eQPeQs+NOLGW47g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706897818; a=rsa-sha256; cv=none; b=uiC7r30CDB7MJpkNq6SJAlO2xhPtaP7BOeSB3uVhaGpwudQiVHeo7z5PbQIzpKUOJpAQX7 4LAObsHJEyCkT41beyCIC8/+vTBZNQZVLyxwIv+yXbDGKOLU/BI7/peYGqFf8kGOioJp0/ WP3atL6Zr1iEQZmUF/HzYyyX9u2mP7jsf5+3aIWYDBVNs5knBeGCQRr/3TLoE8UHnyzTpb 5AM9tDWqr0P3ictzsL8gPMSsBfhYy8cOf7R2CPYvoYthVcRpriF+65G0VCs97bujzjSv14 t6iYF2rbasllpPO1RwhUul3K2/BiB32DX5iJqJlyIwVmc5DmWdaV8FpG+BohtA== 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 4TRPB2348xzh6q; Fri, 2 Feb 2024 18:16:58 +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 412IGw0Z069962; Fri, 2 Feb 2024 18:16:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 412IGwOP069959; Fri, 2 Feb 2024 18:16:58 GMT (envelope-from git) Date: Fri, 2 Feb 2024 18:16:58 GMT Message-Id: <202402021816.412IGwOP069959@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: 02b0d4b688cc - main - 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: 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 02b0d4b688cc4deb14cb6e7534a2a4958e48b753 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=02b0d4b688cc4deb14cb6e7534a2a4958e48b753 commit 02b0d4b688cc4deb14cb6e7534a2a4958e48b753 Author: Lexi Winter AuthorDate: 2024-02-02 16:41:40 +0000 Commit: Warner Losh CommitDate: 2024-02-02 18:11:17 +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 --- sys/sys/cdefs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index fcc90b4d8aee..206cc569c55a 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -358,6 +358,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 + /* * We use `__restrict' as a way to define the `restrict' type qualifier * without disturbing older software that is unaware of C99 keywords.