[Bug c++/124457] spurious reflection cannot be applied to a placeholder type error in constrained return types

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 20 13:11:43 GMT 2026


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
get_reflection errors if it gets is_auto.

In the "void f1(True auto x);" case it gets "auto:1", for which is_auto is
false.
In the "auto f3(int) -> True auto;" it gets "auto", coming from
cp_parser_placeholder_type_specifier -> make_constrained_auto, which is
is_auto.  Its PLACEHOLDER_TYPE_CONSTRAINTS_INFO is null so I don't know how
we'd tell them apart.


More information about the Gcc-bugs mailing list