On Fri, Apr 20, 2018, 8:28 AM Nathan Sidwell <nat...@acm.org> wrote: > On 04/18/2018 01:07 AM, Jason Merrill wrote: > > I wonder if it would work to use CONVERT_EXPR for reinterpret_cast. > > That's kind of the wrong way round, isn't it? NOP_EXPRs are for things > that don't generate code, which a reinterpret_cast is. static_cast adds > a constant, which is only zero for conversions through the primary base > (or suitably placed empty base). CONVERT_EXPR would seem more natural > there? >
Any time we need an actual adjustment, there will be a PLUS_EXPR. The issue is somehow distinguishing between a reinterpret_cast and one of the many other sources of NOP_EXPR. I'm not really clear on what the difference between NOP and CONVERT is supposed to be, anyway... Jason