aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Poulhiès <poulhies@adacore.com>2024-10-28 16:10:25 +0100
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-10-29 11:08:22 +0100
commit61977b8af087a8e0f738a2c51f86ec12c554ec43 (patch)
treebafe08846156970fdc23ecef642a46316b14d0f6
parent63b6967b06b5387821c4e5f2c113da6aaeeae2b7 (diff)
downloadgcc-61977b8af087a8e0f738a2c51f86ec12c554ec43.zip
gcc-61977b8af087a8e0f738a2c51f86ec12c554ec43.tar.gz
gcc-61977b8af087a8e0f738a2c51f86ec12c554ec43.tar.bz2
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.
-rw-r--r--gcc/ada/types.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/ada/types.h b/gcc/ada/types.h
index 3193f01..6a7d797 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