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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:1853b02d8c127740055242123db2d32cf9476ea9

commit r15-7822-g1853b02d8c127740055242123db2d32cf9476ea9
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Mar 5 06:41:00 2025 +0100

    c++: Apply/diagnose attributes when instatiating
ARRAY/POINTER/REFERENCE_TYPE [PR118787]

    The following testcase IMO in violation of the P2552R3 paper doesn't
    pedwarn on alignas applying to dependent types or alignas with dependent
    argument.

    tsubst was just ignoring TYPE_ATTRIBUTES.

    The following patch fixes it for the POINTER/REFERENCE_TYPE and
    ARRAY_TYPE cases, but perhaps we need to do the same also for other
    types (INTEGER_TYPE/REAL_TYPE and the like).  I guess I'll need to
    construct more testcases.

    2025-03-05  Jakub Jelinek  <ja...@redhat.com>

            PR c++/118787
            * pt.cc (tsubst) <case ARRAY_TYPE>: Use return t; only if it
doesn't
            have any TYPE_ATTRIBUTES.  Call apply_late_template_attributes.
            <case POINTER_TYPE, case REFERENCE_TYPE>: Likewise.  Formatting
fix.

            * g++.dg/cpp0x/alignas22.C: New test.

Reply via email to