diff options
author | Marek Polacek <polacek@redhat.com> | 2023-12-13 18:25:47 -0500 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2023-12-13 18:55:11 -0500 |
commit | 3333a064e4925afa1ad5f2f8c1350c4f57d631ce (patch) | |
tree | 9fbc9b739ed042410126ba9b527758e3b3f3db3b | |
parent | c535360788e142a92e1d8b1db25bf4452e26f5fb (diff) | |
download | gcc-3333a064e4925afa1ad5f2f8c1350c4f57d631ce.zip gcc-3333a064e4925afa1ad5f2f8c1350c4f57d631ce.tar.gz gcc-3333a064e4925afa1ad5f2f8c1350c4f57d631ce.tar.bz2 |
c++: fix cpp0x/constexpr-ex1.C in C++23
Since r14-6505 I see:
FAIL: g++.dg/cpp0x/constexpr-ex1.C -std=c++23 at line 91 (test for errors, line 89)
FAIL: g++.dg/cpp0x/constexpr-ex1.C -std=c++23 (test for excess errors)
FAIL: g++.dg/cpp0x/constexpr-ex1.C -std=c++26 at line 91 (test for errors, line 89)
FAIL: g++.dg/cpp0x/constexpr-ex1.C -std=c++26 (test for excess errors)
and it wasn't fixed by r14-6511. So I'm fixing it with the below.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/constexpr-ex1.C: Adjust expected diagnostic line.
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C index 383d38a..b26eb5d 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C @@ -88,7 +88,7 @@ struct resource { }; constexpr resource f(resource d) { return d; } // { dg-error "non-.constexpr." "" { target { { { ! implicit_constexpr } && c++20_down } || c++11_only } } } -// { dg-error "non-.constexpr." "" { target { c++23 && { ! implicit_constexpr } } } .-2 } +// { dg-error "non-.constexpr." "" { target { c++23 && { ! implicit_constexpr } } } .-1 } constexpr resource d = f(9); // { dg-message ".constexpr." "" { target { { ! implicit_constexpr } || c++11_only } } } // 4.4 floating-point constant expressions |