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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <[email protected]>:

https://gcc.gnu.org/g:30992707103392fbe55b972a09fa6497cf3157e3

commit r17-4231-g30992707103392fbe55b972a09fa6497cf3157e3
Author: Marek Polacek <[email protected]>
Date:   Mon Aug 24 15:07:25 2026 -0400

    c++: function wrongly regarded immediate-escalating [PR126970]

    This should fail:

      using info = decltype(^^void);
      struct M { info i = ^^int; M(); };
      M::M() = default;

    because CWG 3153 added "non-user-provided", and a function defaulted on
    a declaration other than its first is user-provided.

            PR c++/126970

    gcc/cp/ChangeLog:

            * cp-gimplify.cc (immediate_escalating_function_p): Check
            !user_provided_p.

    gcc/testsuite/ChangeLog:

            * g++.dg/reflect/cwg3153-2.C: New test.

    Reviewed-by: Jason Merrill <[email protected]>

Reply via email to