From nobody Sat Jul 20 16:12:35 2024 X-Original-To: dev-commits-src-branches@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 4WRBQW5dTNz5RvkB; Sat, 20 Jul 2024 16:12:35 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRBQW4spqz4TvJ; Sat, 20 Jul 2024 16:12:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721491955; 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=i/B25EZWHoJwrRm3znQNzCZHPzKXk/wm+DZAgVcCCJc=; b=hVOfYOInxbjxeIFp1awwTX8Hb1H3tt1MzyvZr/FZrdCnTIM6MKcyhF7mbdFKYM+sFFMY5S 3XqdZmTF8JGVM8F6ZVyz20m/7PdLe8Z9bcatN0rgMnEwueP1EqZ+gxojUkAER5LUAboMkm /8BYUAYoSoJ27IhFGkzJhViZG7gc+d65FDaP9BjLpzUXsZm+O/zKjn6Li2PaXPyM3T0dM+ PcbLEqzW5qAPelHOEB8h4+J78sUV2Z98tNK7H7rWGtjiMG/6mtYpMDdjuFMn0CL8kxsxTx t4uZnVojReNRZy26xwsEGjBhDAboX0BkBu/EEq/96Ill+o7LgAt49KSPECfibA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721491955; a=rsa-sha256; cv=none; b=NSEDPmWP4kwwzV6JVHfSRhTwzi5vWv/faQI9wqwVnS1Xd0Xm0MKMYEDIR1fx2kxS5cfpr/ /YiHH98YXs754vOATsnZABdGQbJsRvwlShYqS7q3OGlLkxdzV9wtdZlavBhhncnLuhJDxU 5ObXkBRyTPyrZYJsuQ6ZKWEGzrmWcRirqGMGGVrY+RmDLHZj00cJR7IEQGT1gF8TF3AE10 XcIupWdPKB4abjpeLjUrGl7NnrRL5Hr5UKcbMRla8LwFNaBEaRQ1oZMUzf4ISuM4XV40TI pu5pg2IH0zdUoHQ6Xh9KIAr4ApLnBQb2MpKJBZw1R3sgJtVfHwGpIsMqviW4OA== 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=1721491955; 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=i/B25EZWHoJwrRm3znQNzCZHPzKXk/wm+DZAgVcCCJc=; b=SxfCS2/3l6eXi0uiuPD9f1V7I0Q+wR26aps0mOpcnHXxY1xxxByPp7qXInxfo8iQNm1/oC MceFctfQoPHlFOlpfONlWw600idpKkNIV1vULH5MuaxUoqTq6z6reDSPMV0b80ag8UiSRQ Thx26gy/jdz/9eD62MfBMeFinjcE3e381d2KdEPg9j9bowEdrHkT0KW5Ezx7lDK6E1i03t /TNaT1aZGJ6W24+wdsCVKzSFtdZdj5FeDCqt/FOB08Yz/+gr2n95yDuUd5ln1aUbC3N5GZ hRpj5jrj9i72WgjR/cy6jRJvMwwpMDnTsDAqPqnslCuAgZqnoF/baihZrIGC0Q== 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 4WRBQW4TYBzNrm; Sat, 20 Jul 2024 16:12:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46KGCZDV080115; Sat, 20 Jul 2024 16:12:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46KGCZOx080112; Sat, 20 Jul 2024 16:12:35 GMT (envelope-from git) Date: Sat, 20 Jul 2024 16:12:35 GMT Message-Id: <202407201612.46KGCZOx080112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: d3de5c5b4529 - stable/13 - cdefs.h: Don't define fallback for _Static_assert List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d3de5c5b45293d15f8b87f2e529318dd99988d4c Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d3de5c5b45293d15f8b87f2e529318dd99988d4c commit d3de5c5b45293d15f8b87f2e529318dd99988d4c Author: Warner Losh AuthorDate: 2024-07-20 15:57:53 +0000 Commit: Warner Losh CommitDate: 2024-07-20 16:11:49 +0000 cdefs.h: Don't define fallback for _Static_assert Remove pre 4.6 code to define _Static_assert in terms of _COUNTER. We no longer need to support compilers this old (in fact support for all pre gcc 10 compilers has been removed in -current). This is a partial MFC of that work because removing this fixes a bug that's oft reported with -pedantic-errors and C++98 compilations. PR: 280382, 276738 Sponsored by: Netflix This is a direct commit to stable/14. (cherry picked from commit 22cdafe197ac960c5ce839ef6ec699b59f4b0080) --- sys/sys/cdefs.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index d9e1c476f1ef..080ae0912210 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -278,15 +278,6 @@ #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_static_assert) #define _Static_assert(x, y) static_assert(x, y) -#elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus) -/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ -#elif defined(__COUNTER__) -#define _Static_assert(x, y) __Static_assert(x, __COUNTER__) -#define __Static_assert(x, y) ___Static_assert(x, y) -#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ - __unused -#else -#define _Static_assert(x, y) struct __hack #endif #endif