From nobody Mon Jun 24 21:10:56 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 4W7LGn0ZWQz5Pfsd; Mon, 24 Jun 2024 21:10:57 +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 4W7LGm68F0z45Lg; Mon, 24 Jun 2024 21:10:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719263456; 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=T5+LQ8JS9OoJ+esL3a7uyi+Z2eFnAGm4ly8wYccG9to=; b=Av31feCs8v2iad6t45uBFjP10eLXfMSgpbMEMmvVeBW/W6h3OcPFsFXH1n/pCW2d0Npayy aO/+bj9lw9ncDI3Fo37xrKRTetEAJSrot+gnNswVfMc2SBFrz5kMAZqukoMVl0Tu1lf3zv IzvbOEROpxsuvwt1xNlA6j6MFwzTm9IEMe4MBMC7s0Jkn+OJ3AjhUdFIRd8k8M+NPeacPX HQY+qc3jcFofmzKR977mJyswgd3LCjJgVjQ3snyGeV2M25bqSLETRTgDiuFZK23YdBMfQ3 ceArlA5lHw9KU1ZA8Mk2sl+1uhFAVfnKLUfb/irlJ/ch7Q99JM0aCjIqmh/L3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719263456; a=rsa-sha256; cv=none; b=NsYdndiTyIE0pIDivi4789bXXvMVA4tdhfJdKy0sjfEu/TTMLlzidLdBuXgAS+XCh3Erd4 MNdRCqOoZxQV18jTJ+XWq+GCIIbtDDKQVz/sBR0rFuWgKK96UGqCvY+eOuvcWvi6FFkTok ODs+bHjHub0NhbcZErwik/Vkhfqo29gJA4RfZd3zYuoOtyI0coQxFZun4nKH5j0mAOa2dC Fwd7dqSEmtWh88dC9y0x/S5S+hUeAeyaFJm/gdQwkiyrjFItZghp/wgqgDw0Ui/hJiflrf cfxgpYGcixdV0tEPUl/VV9Qs2+/zOkwrfpK5rKnxQ8vp168eq0R9ZFljfa3b0w== 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=1719263456; 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=T5+LQ8JS9OoJ+esL3a7uyi+Z2eFnAGm4ly8wYccG9to=; b=EkRItiEgxs1oBJSr874ma8Xg8t04rcic51ZFq/9QtRB99EAXd21pzjH7Ca/8dRCMQ1eX+2 SSpHj5DT4/Ncz2hBaONKbAcoRrNsumeqbg7kJgg0dfT9N2+7DA4qTrgmF7mUQxk3Ir2l9I 17i18KNXmuPJmPEbhhYc7hVQ0Ph2AL031k4/atxWU0Eolli2avV5Dc0UQCOj8gBKmf3oaN fnPDIW8zlQV8TdFEgMef7UP1x2jxKVmWU+Lu5CFtLIopL+4g6z+L1IcSh1cdoTyT6hbrtR PIhajnSMv7jJc37pKor6miOxB9VO1nVg9UcUQ5aOPoYS1psDXdE3AlRzBXCVAA== 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 4W7LGm5ldpzZbG; Mon, 24 Jun 2024 21:10:56 +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 45OLAusf045424; Mon, 24 Jun 2024 21:10:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OLAuAR045421; Mon, 24 Jun 2024 21:10:56 GMT (envelope-from git) Date: Mon, 24 Jun 2024 21:10:56 GMT Message-Id: <202406242110.45OLAuAR045421@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: 677b28750a86 - main - sys/cdefs.h: Note gcc supports many __has_* macros 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 Sender: owner-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: 677b28750a86a63d2e94d1187166fe5ccf0e1813 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=677b28750a86a63d2e94d1187166fe5ccf0e1813 commit 677b28750a86a63d2e94d1187166fe5ccf0e1813 Author: Warner Losh AuthorDate: 2024-06-24 19:20:57 +0000 Commit: Warner Losh CommitDate: 2024-06-24 21:11:05 +0000 sys/cdefs.h: Note gcc supports many __has_* macros The __has_* macros are no longer clang-speicifc. gcc 5 introduced __has_include, gcc 9 introduce __has_attribute, gcc 10 introduced __has_builtin. So all of these are supported by all the versrions of gcc we support as a project (we have gcc 10 and newer ports, but no older ones), so just refer to them as supported by gcc. The exact version doesn't matter so much these days (we provide a fallback for older compilers still, should anybody still be using them), so don't mention them in the comments (but here in the commit message they are discoverable). gcc 14 adds __has_feature and __has_extension, so note that since it will be relevant for many years. Sponsored by: Netflix --- sys/sys/cdefs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 32050ef81848..58146ddc721c 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -40,7 +40,10 @@ #endif /* - * Testing against Clang-specific extensions. + * Provide clang-compatible testing macros. All supported versions of gcc (10+) + * provide all of these except has_feature and has_extension which are new in + * gcc 14. Keep the older ifndefs, though, for non-gcc compilers that may lack + * them like tcc and pcc. */ #ifndef __has_attribute #define __has_attribute(x) 0