[Bug c++/105809] [10/11/12/13 Regression] GCC ICE when deal with __PRETTY_FUNCTION__ inside macro
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 1 21:38:31 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105809
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code,
| |rejects-valid
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #2)
> The ICE started with
But the 7.x ICEd on and rejected the original testcase:
template<typename ss> void hh() { ss t; }
template<typename ss>
struct tt { ss t; };
template<int>
int f(void)
{
constexpr char const* cc = __PRETTY_FUNCTION__;
struct j{ char const* kk=cc; };
tt<j> y;
hh<j>();
}
int t = f<1>();
GCC 8+ accepts the above code though.
So in summary, the ICE is a regression but the rejects valid is not and could
be workaround by using a struct first?
More information about the Gcc-bugs
mailing list