aboutsummaryrefslogtreecommitdiff
path: root/libiberty/regex.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-03-28 21:33:57 -0400
committerJason Merrill <jason@redhat.com>2024-04-01 12:02:50 -0400
commitbba118db3f63cb1e3953a014aa3ac2ad89908950 (patch)
treefddd4650fb13d2db4f9809d98f4b77efb1c195d0 /libiberty/regex.c
parentd28ea8e5a70474cf9d28bf0c008092c936ad1358 (diff)
downloadgcc-bba118db3f63cb1e3953a014aa3ac2ad89908950.zip
gcc-bba118db3f63cb1e3953a014aa3ac2ad89908950.tar.gz
gcc-bba118db3f63cb1e3953a014aa3ac2ad89908950.tar.bz2
c++: C++26 returning reference to temporary
P2748R5 makes it ill-formed to return a reference to temporary in C++26; implementing this is a simple matter of changing the existing warning to a permerror. For most of the tests I just changed dg-warning to dg-message to accept both; I test the specific diagnostic type in Wreturn-local-addr-5.C. gcc/cp/ChangeLog: * typeck.cc (maybe_warn_about_returning_address_of_local): Permerror in C++26. gcc/testsuite/ChangeLog: * g++.dg/conversion/pr16333.C: Change dg-warning to dg-message. * g++.dg/cpp0x/constexpr-48324.C * g++.dg/other/pr94326.C * g++.dg/warn/Wreturn-local-addr-2.C * g++.old-deja/g++.jason/warning8.C: Likewise. * g++.dg/cpp1y/auto-fn6.C: Check that others don't complain. * g++.dg/warn/Wreturn-local-addr-5.C: Expect error in C++26.
Diffstat (limited to 'libiberty/regex.c')
0 files changed, 0 insertions, 0 deletions