diff --git a/assert/tst-assert-c++.cc b/assert/tst-assert-c++.cc index 9d587a16fa..8f06ff8223 100644 --- a/assert/tst-assert-c++.cc +++ b/assert/tst-assert-c++.cc @@ -21,6 +21,7 @@ #undef NDEBUG #include +#if __GNUC_PREREQ (5, 0) /* The C++ standard requires that if the assert argument is a constant subexpression, then the assert itself is one, too. */ constexpr int @@ -77,5 +78,14 @@ do_test () return 0; } +#else +#include + +static int +do_test () +{ + return EXIT_UNSUPPORTED; +} +#endif #include