diff options
Diffstat (limited to 'assert/tst-assert-c++.cc')
-rw-r--r-- | assert/tst-assert-c++.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/assert/tst-assert-c++.cc b/assert/tst-assert-c++.cc index 9d587a1..ab404ef 100644 --- a/assert/tst-assert-c++.cc +++ b/assert/tst-assert-c++.cc @@ -1,5 +1,5 @@ /* Tests for interactions between C++ and assert. - Copyright (C) 2017-2024 Free Software Foundation, Inc. + Copyright (C) 2017-2025 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ #undef NDEBUG #include <assert.h> +#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 <support/test-driver.h> + +static int +do_test () +{ + return EXIT_UNSUPPORTED; +} +#endif #include <support/test-driver.c> |