On 04/23/2018 01:19 PM, Jason Merrill wrote:
On Fri, Apr 20, 2018, 12:52 PM Nathan Sidwell <nat...@acm.org
I have to change convert_ptrmem to always
expand the constant (into an OFFSET_TYPE) so that
initializer_constant_valid_p (used by reduced_constant_expression_p)
doesn't get confused by a zero-adjusting conversion of a ptrmem_cst.
Hmm, I'm nervous about this change. Maybe teach r_c_e_p to handle this
case properly?
Here's an updated patch. We keep convert_ptrmem unchanged. I didn't
need to teach RCEP anything new, fortunately. In
cxx_eval_constant_expression I call cplus_expand_constant on the cases
that we previously complained were reinterpret_casts. This does seem
somewhat ugly though.
bootstrapped on x86_64-linux
nathan
--
Nathan Sidwell