From: Marc Poulhiès Date: Mon, 28 Oct 2024 15:10:25 +0000 (+0100) Subject: ada: Fix static_assert with one argument X-Git-Tag: basepoints/gcc-16~4818 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61977b8af087a8e0f738a2c51f86ec12c554ec43;p=thirdparty%2Fgcc.git ada: Fix static_assert with one argument 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. --- diff --git a/gcc/ada/types.h b/gcc/ada/types.h index 3193f01444c0..6a7d797905cb 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