On Wed, Apr 18, 2018 at 02:59:34PM +0200, Jakub Jelinek wrote:
> On Wed, Apr 18, 2018 at 05:07:33AM +0000, Jason Merrill wrote:
> > I wonder if it would work to use CONVERT_EXPR for reinterpret_cast.

As for reinterpret_cast, we e.g. accept
constexpr int a = reinterpret_cast<int> (1);
which clang++ rejects, shouldn't we simply in build_reinterpret_cast_1
when not returning error_mark_node wrap the return value inside some new
FE tree (or reuse REINTERPRET_CAST_EXPR) and remove it only during
genericization, so that we can reliably reject those in constexpr handling,
perhaps only if not !ctx->quiet?

        Jakub

Reply via email to