aboutsummaryrefslogtreecommitdiff
path: root/libcpp/system.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-11-19 17:01:10 -0500
committerJason Merrill <jason@redhat.com>2021-11-22 17:42:53 -0500
commit5440c88e61f5c624eb87e19801eef6eedf27e8ab (patch)
treec5ede3ce9a981ca2934d5a24df4b7102c8ef5e42 /libcpp/system.h
parenta6e0d593707ae44dec0bdf2bcdc4f539050b46db (diff)
downloadgcc-5440c88e61f5c624eb87e19801eef6eedf27e8ab.zip
gcc-5440c88e61f5c624eb87e19801eef6eedf27e8ab.tar.gz
gcc-5440c88e61f5c624eb87e19801eef6eedf27e8ab.tar.bz2
c++: improved return expression location
Stripping the location wrapper from retval meant we didn't have the necessary location information for any conversion diagnostics. We only need the stripping for the named return value optimization, let's use the unstripped expression for everything else. gcc/cp/ChangeLog: * typeck.c (check_return_expr): Only strip location wrapper during NRV handling. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/pr65327.C: Adjust location. * g++.dg/cpp23/constexpr-nonlit4.C: Likewise. * g++.dg/cpp23/constexpr-nonlit5.C: Likewise. * g++.dg/cpp2a/constexpr-init1.C: Likewise.
Diffstat (limited to 'libcpp/system.h')
0 files changed, 0 insertions, 0 deletions