aboutsummaryrefslogtreecommitdiff
path: root/libcpp/generated_cpp_wcwidth.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2025-10-08 16:09:49 +0100
committerJason Merrill <jason@redhat.com>2025-10-08 16:09:49 +0100
commitd77b548fb647d52817d0c44d45bb817d166b7a19 (patch)
tree444b902dab0d3eaa83722c9059568268a9c0a087 /libcpp/generated_cpp_wcwidth.h
parentd52a81fdb3cec0de08bbcefd3c0a31817133b95f (diff)
downloadgcc-d77b548fb647d52817d0c44d45bb817d166b7a19.zip
gcc-d77b548fb647d52817d0c44d45bb817d166b7a19.tar.gz
gcc-d77b548fb647d52817d0c44d45bb817d166b7a19.tar.bz2
c++: clobber non-placement new
And also add the clobber for non-placement new. For now let's limit the clobber of an array with non-constant bound to placement new in constant evaluation, where we need it to set the active member of a union. And catch some additional cases of there being no actual data to clobber. This changes the diagnostics in a couple of analyzer tests, but the new diagnostics are also valid. It also adds some -Wuninitialized warnings which seem like an improvement; the lines that now warn about an uninitialized vptr are correct, since trying to assign to a member of a virtual base reads the vptr of an object that was never created. gcc/cp/ChangeLog: * init.cc (build_new_1): Also clobber for non-placement new. Only loop clobber in constexpr. * expr.cc (wrap_with_if_consteval): New. * cp-tree.h (wrap_with_if_consteval): Declare. gcc/testsuite/ChangeLog: * g++.dg/analyzer/new-2.C: Adjust diags. * g++.dg/analyzer/noexcept-new.C: Adjust diags. * g++.dg/warn/Warray-bounds-23.C: Add warnings. * g++.dg/warn/Warray-bounds-24.C: Add warnings. * g++.dg/cpp26/constexpr-new4a.C: New test.
Diffstat (limited to 'libcpp/generated_cpp_wcwidth.h')
0 files changed, 0 insertions, 0 deletions