https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124173
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|jakub at redhat dot com |jakub at gcc dot
gnu.org,
| |jason at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ah, the problem is that the maybe_constant_value is done earlier only in the
7672 else if (INTEGRAL_OR_ENUMERATION_TYPE_P (type)
7673 || cxx_dialect >= cxx17)
case, so in the integral or enumeration case I was looking at it is performed,
but for nullptr it is not (reflection expr case is ok, because anybody who
tries to use -freflection -std=c++{11,14} deserves failures).
So, the question is if that condition should be extended to include
NULLPTR_TYPE_P case too, or if the NULLPTR_TYPE_P handling should call
maybe_constant_expr for C++11/14 if not tf_error.