-
- Downloads
c++: zero-init and class nttp [PR94568]
A zero-initializer should not reflect the constness of what it's initializing, as it does not for initializers with different syntax. This does have mangling implications for rare C++20 code, but it seems infeasable to make the mangling depend on -fabi-version while fixing the semantic bug, and C++20 is still experimental anyway. PR c++/94568 gcc/cp/ChangeLog: * init.cc (build_zero_init_1): Call cv_unqualified. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/nontype-class36.C: Remove xfail. * g++.dg/cpp2a/nontype-class37.C: Remove xfail. * g++.dg/cpp1z/nontype-auto26.C: New test.
Showing
- gcc/cp/init.cc 3 additions, 0 deletionsgcc/cp/init.cc
- gcc/testsuite/g++.dg/cpp1z/nontype-auto26.C 29 additions, 0 deletionsgcc/testsuite/g++.dg/cpp1z/nontype-auto26.C
- gcc/testsuite/g++.dg/cpp2a/nontype-class36.C 1 addition, 1 deletiongcc/testsuite/g++.dg/cpp2a/nontype-class36.C
- gcc/testsuite/g++.dg/cpp2a/nontype-class37.C 1 addition, 1 deletiongcc/testsuite/g++.dg/cpp2a/nontype-class37.C
Loading
Please register or sign in to comment