https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115358

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:e3915c1ad56591cbd68229a64c941c38330abd69

commit r15-1614-ge3915c1ad56591cbd68229a64c941c38330abd69
Author: Patrick Palka <ppa...@redhat.com>
Date:   Tue Jun 25 10:42:21 2024 -0400

    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 <ja...@redhat.com>

Reply via email to