diff options
author | Patrick Palka <ppalka@redhat.com> | 2024-06-25 10:42:21 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2024-06-25 10:42:21 -0400 |
commit | e3915c1ad56591cbd68229a64c941c38330abd69 (patch) | |
tree | c139567b6c66dbdd90aa38734f9c1a648af408ee /gcc/dwarf2codeview.h | |
parent | 21f1073d388af8af207183b0ed592e1cc47d20ab (diff) | |
download | gcc-e3915c1ad56591cbd68229a64c941c38330abd69.zip gcc-e3915c1ad56591cbd68229a64c941c38330abd69.tar.gz gcc-e3915c1ad56591cbd68229a64c941c38330abd69.tar.bz2 |
c++: using non-dep array var of unknown bound [PR115358]
For a non-dependent array variable of unknown bound, it seems we need to
try instantiating its definition upon use in a template context for sake
of proper checking and typing of the overall expression, like we do for
function specializations with deduced return type.
PR c++/115358
gcc/cp/ChangeLog:
* decl2.cc (mark_used): Call maybe_instantiate_decl for an array
variable with unknown bound.
* semantics.cc (finish_decltype_type): Remove now redundant
handling of array variables with unknown bound.
* typeck.cc (cxx_sizeof_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/template/array37.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/dwarf2codeview.h')
0 files changed, 0 insertions, 0 deletions