From patchwork Tue Oct 29 10:10:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 99754 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 544E0385840C for ; Tue, 29 Oct 2024 10:11:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 954983858D34 for ; Tue, 29 Oct 2024 10:10:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 954983858D34 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 954983858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::429 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730196642; cv=none; b=jq2UV35SvYp2FBWuZk5V1h/1x6rRsjEUczhcf2XAA6YI57IBhujEbSQAuS9Mf5b7xoTHB7YDSAAxLbkVLcMJsvxCSRHBkHPtiwiIlyO+dDrOYCj5/uwItSOnrAs/6VzzcQr1liwz127WhTRtWXjWh2LnpOkEIuQa2/tEQsImpo8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730196642; c=relaxed/simple; bh=jy9GNNH4HUD7wrBndqw+BI497jtlNilfrYFlQhpyGFc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=NYDTepXd0DsYeN9aRC4O5Ugv0m77Jnm7f+K3Np32g1n3XoMKhbk8KJOYG9QqAB1EG4isXTywBhkoDMUl5bs+03o1zLsFHUMZQtSML6iXQ1uQOmLVA9UU8utXlActA5vdNVHbCdKfxbIcu7pjcINNRn++0LcZ4COv2Tg7FqyLa9I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-37d4a5ecc44so3429466f8f.2 for ; Tue, 29 Oct 2024 03:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1730196634; x=1730801434; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SCuNXaMI9yIPfOjYebLM0gAqjdTAateU/PUNL6eEYY8=; b=SrY4qg3loXSk3jtvoWYxM8IROWqcgaFpx9nqHb8x+ju0IIMpY1F4OwybXmBz3FmTgx 27R8wWvSR9sTQevWv1UwAVOsbWH4qjYW0Bk/bE6WpyBaZph+braqHRX7dyDHqoF51twE a04cXX74ZK/7OKuEmd3ioR9qC3iHHSMd0lGIxV8XucKV5JQLMengO/wcmBIJWkbzE7Ad 1FXG5r1l7YSTniJtdED0ZDy0TUNX3TVP+IXuAUAT5Ln6BEGRXGiuUq8f2TgOVc+fgnd8 MiXfjM/hmoKIiaQmEZPPWFTH+TsPTzm7ICLJRn0wU2YJfuQlF3HjB3APSTQvRz/7nchc 5uFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730196634; x=1730801434; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SCuNXaMI9yIPfOjYebLM0gAqjdTAateU/PUNL6eEYY8=; b=fqnIR2dkQgInmlDp/HBn4zGWQP4QnPIuaWDt76eIkdXlN+0p0suOO30Bc879OkMMsT DZ7pz91AGMMrEC88++8tocJXuzWNkomtWA1g5XDQ4wXoKjhAVijv+QQ3tHNTiiZgWPYy lSRLKCbraNXEIRFSqcu70KeQ9tzJVPPrOLOQyG/EEUr3w8KZGOkDEZ/R4yoAa/BO2wbk 8U/yyeVZaH+fGCqDpYr1r4eNIH66WMQJhySiY1R+fAYlYzT4gFzq8gZlkTcn5CHQ2m3U CHhVVJ0Ueax6UDohmU6quBn6f1xytr72HyS07uZK1lFmzyzc7XD6A7mj9Cy0JvniLEpa 4uwg== X-Gm-Message-State: AOJu0YzCaAb7cXRR0QkJbz7rLIWs+7zFR3Jd4/l02MKlCHkrKjbTJd/B QTyQZifGmtVFH/IDaBvKbPFzYP1nr8RvyIMpIKFSGpyIuUtUmtLtGPPrjzjjYvAFNQ1sBEx4kCM = X-Google-Smtp-Source: AGHT+IELAmjsp95RTLagF6V4qqKSMiK1ieAuuA13S4YuQNqqxX1iaITyxq62S3Z56CypZ9hfvpguNA== X-Received: by 2002:a5d:6a43:0:b0:37d:890c:63e4 with SMTP id ffacd0b85a97d-380611ff53cmr8366086f8f.55.1730196634144; Tue, 29 Oct 2024 03:10:34 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b1c363sm12053583f8f.7.2024.10.29.03.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 03:10:33 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Marc_Poulhi=C3=A8s?= Subject: [COMMITTED] ada: Fix static_assert with one argument Date: Tue, 29 Oct 2024 11:10:17 +0100 Message-ID: <20241029101017.966453-1-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org Single argument static_assert is C++17 only and breaks the build using older GCC (prerequisite is C++14). gcc/ada * types.h: fix static_assert. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/types.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gcc/ada/types.h b/gcc/ada/types.h index 3193f01444c..6a7d797905c 100644 --- a/gcc/ada/types.h +++ b/gcc/ada/types.h @@ -383,11 +383,9 @@ typedef unsigned int any_slot; #define Slot_Size (sizeof (any_slot) * 8) /* Slots are 32 bits (for now, but we might want to make that 64). - The first bootstrap stage uses -std=gnu++98, so we cannot use - static_assert in that case. */ -#if __cplusplus >= 201402L -static_assert (Slot_Size == 32); -#endif + The first bootstrap stage uses C++14, so we can only use the 2 argument + version of static_assert. */ +static_assert (Slot_Size == 32, ""); /* Definitions of Reason codes for Raise_xxx_Error nodes. */ enum RT_Exception_Code