From nobody Sat Jul 20 16:07:45 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 4WRBJy320bz5Rvch; Sat, 20 Jul 2024 16:07:46 +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 4WRBJy2FrQz4T9W; Sat, 20 Jul 2024 16:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721491666; 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=vglkEL0YangU6l90AG1Q4uLPkkU7QBsrzvt0889XNaM=; b=ySP1x6ueIIpNNnKSyNkq+5w3HiaoDwIFm6TNbcEA5/gM6L5y1kXhogzBbOd9jMMEymiwa0 aqBC1qTWAn6G6nnxusr7m8UfNW2RTY8XbSHdu1Ut3VCM7HhPMbdNG3NHfsBY9IQgnaSJc/ QTY1ZKmMY8jmwIqDYbzwEegBu4GCRL7Vn0PP1EfCTjT7A9jHrshceQQrwIREG5Eia3iEGH pj4xBDbZ1Bzp/vabqQ5AfpBK060jpWfZA12d6vIwP8u8kJRsmUFoCD0yJS7Dk6bp1pTGa+ f4+8lIoBdaRijyHJpg5Yj9eOnusq3ciMhuMgHl6RnDczk776AroGe7f3XUDxUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721491666; a=rsa-sha256; cv=none; b=jPOvQ+JTkAbkSnHTx/5QW3T2Jo/rmycUt0bPoGnBoXNm34o0QNkxnotORJAJjoY59OguSr 9NKZotwbqZW5sEghVcU3dowU6rNOZqCQZl0XBOdk3z2mkgB2RtbD7DELy2cXILMApfa/jY jey5pbqbHvs2za4Bt1X/iVWTXOCdKHhC0Wkccqjhl7pYnEPP2m1iuVe7WZV8XPUodVHv9t zK3he+fheoORywaeY1Soln8p4Gt1ypzDQdQpUVcpMz02NrMJ8rEhrk6Reub/c5VzLwH1IY 0p6P7jFOUwDPYaS720tAJYe9rfRaVAftzeQx+eH8i20pjzRgxc8+hZt1lIIJVw== 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=1721491666; 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=vglkEL0YangU6l90AG1Q4uLPkkU7QBsrzvt0889XNaM=; b=kw/ympVSRG4mF07EmuJq3k51sZC+AC1CW5o3vf5rfa5zNusxRiTgNV/R/Fn3U7EGBN3o6q 3OS6gqOwTu3XD/Uis6/XDZrfonzdph7wtMSWDMIMMuywtTbeXiw3M/v1cfwf7kXiEvsGz2 dWpmAZkGZKhSb/l1r4OkFmwZXn9OipGgCIN+I3Cg0xIaDCJO34H87HXP0XcSrwtNyAkYyb wmGZaeR3Y609Qr6m9+HaJe1d3AGu/0Divg8+9LBs7HVquK+ZWPLTZPob644pgd3VrTKNCI 9Y4v59/MkwNYaFd2OAmXrx97pRRmpzMhLUoYH7ZHduHTWdK8uRzqQosIebGGKg== 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 4WRBJx6XbSzNPD; Sat, 20 Jul 2024 16:07:45 +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 46KG7jnd064319; Sat, 20 Jul 2024 16:07:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46KG7jro064316; Sat, 20 Jul 2024 16:07:45 GMT (envelope-from git) Date: Sat, 20 Jul 2024 16:07:45 GMT Message-Id: <202407201607.46KG7jro064316@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: 22cdafe197ac - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 22cdafe197ac960c5ce839ef6ec699b59f4b0080 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=22cdafe197ac960c5ce839ef6ec699b59f4b0080 commit 22cdafe197ac960c5ce839ef6ec699b59f4b0080 Author: Warner Losh AuthorDate: 2024-07-20 15:57:53 +0000 Commit: Warner Losh CommitDate: 2024-07-20 15:57:53 +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. --- sys/sys/cdefs.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 19b7d8fe427d..a52864c5db9d 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -277,15 +277,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