https://gcc.gnu.org/g:61977b8af087a8e0f738a2c51f86ec12c554ec43

commit r15-4735-g61977b8af087a8e0f738a2c51f86ec12c554ec43
Author: Marc Poulhiès <poulh...@adacore.com>
Date:   Mon Oct 28 16:10:25 2024 +0100

    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:
---
 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 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

Reply via email to