diff options
author | Jason Merrill <jason@redhat.com> | 2022-02-02 17:49:02 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-02-02 21:14:10 -0500 |
commit | 501c4ee9fad68716497db4d96b63b801cc57b4a1 (patch) | |
tree | 31103d3c37e0e0e071bcd536a55890e206565dca /gcc/ggc.h | |
parent | dc898b2ba5c50a7311bc3137f0987a7831362ed8 (diff) | |
download | gcc-501c4ee9fad68716497db4d96b63b801cc57b4a1.zip gcc-501c4ee9fad68716497db4d96b63b801cc57b4a1.tar.gz gcc-501c4ee9fad68716497db4d96b63b801cc57b4a1.tar.bz2 |
c++: dependent array bounds completion [PR104302]
The patch for PR55227 changed the minimal init-list handling in
cp_complete_array_type to a call to reshape_init, which broke on the
dependent initializer. It occurred to me that trying to deduce the array
size from a dependent init-list is wrong in general, so let's just not. I
also limited the reshape_init call to the case of a char array, as before
the patch for 55227; that's the only case where we want to strip a level of
braces from an array.
PR c++/104302
gcc/cp/ChangeLog:
* decl.cc (maybe_deduce_size_from_array_init): Give up
on type-dependent init.
(cp_complete_array_type): Only call reshape_init for character
array.
gcc/testsuite/ChangeLog:
* g++.dg/template/array35.C: New test.
* g++.dg/template/array36.C: New test.
Diffstat (limited to 'gcc/ggc.h')
0 files changed, 0 insertions, 0 deletions