Re: [C++ PATCH] Fix constexpr POINTER_PLUS_EXPR handling (PR c++/77553)

2016-09-13 Thread Jason Merrill
OK. On Tue, Sep 13, 2016 at 3:55 AM, Jakub Jelinek wrote: > Hi! > > The testcase below shows a bug in POINTER_PLUS_EXPR constexpr handling. > It is handled by 2 different functions, cxx_eval_pointer_plus_expression > and cxx_eval_binary_expression, where the first one calls >

[C++ PATCH] Fix constexpr POINTER_PLUS_EXPR handling (PR c++/77553)

2016-09-13 Thread Jakub Jelinek
Hi! The testcase below shows a bug in POINTER_PLUS_EXPR constexpr handling. It is handled by 2 different functions, cxx_eval_pointer_plus_expression and cxx_eval_binary_expression, where the first one calls cxx_eval_constant_expression on both operands and in some cases optimizes it, in other