c++: Handle RAW_DATA_CST in unify [PR118390]
This patch uses the count_ctor_elements function to fix up unify deduction of array sizes. 2025-01-15 Jakub Jelinek <jakub@redhat.com> PR c++/118390 * cp-tree.h (count_ctor_elements): Declare. * call.cc (count_ctor_elements): No longer static. * pt.cc (unify): Use count_ctor_elements instead of CONSTRUCTOR_NELTS. * g++.dg/cpp/embed-20.C: New test. * g++.dg/cpp0x/pr118390.C: New test.
Showing
- gcc/cp/call.cc 1 addition, 1 deletiongcc/cp/call.cc
- gcc/cp/cp-tree.h 1 addition, 0 deletionsgcc/cp/cp-tree.h
- gcc/cp/pt.cc 1 addition, 1 deletiongcc/cp/pt.cc
- gcc/testsuite/g++.dg/cpp/embed-20.C 14 additions, 0 deletionsgcc/testsuite/g++.dg/cpp/embed-20.C
- gcc/testsuite/g++.dg/cpp0x/pr118390.C 23 additions, 0 deletionsgcc/testsuite/g++.dg/cpp0x/pr118390.C
Loading
Please register or sign in to comment