Re: [PATCH] c++: Fix constexpr evaluation of self-modifying CONSTRUCTORs [PR94219]

2020-04-03 Thread Jason Merrill via Gcc-patches
On 4/3/20 4:57 PM, Patrick Palka wrote: On Fri, 3 Apr 2020, Patrick Palka wrote: On Fri, 3 Apr 2020, Jason Merrill wrote: On 4/2/20 2:19 PM, Patrick Palka wrote: On Thu, 2 Apr 2020, Patrick Palka wrote: This PR reveals that cxx_eval_bare_aggregate and cxx_eval_store_expression do not antic

Re: [PATCH] c++: Fix constexpr evaluation of self-modifying CONSTRUCTORs [PR94219]

2020-04-03 Thread Patrick Palka via Gcc-patches
On Fri, 3 Apr 2020, Patrick Palka wrote: > On Fri, 3 Apr 2020, Jason Merrill wrote: > > > On 4/2/20 2:19 PM, Patrick Palka wrote: > > > On Thu, 2 Apr 2020, Patrick Palka wrote: > > > > > > > This PR reveals that cxx_eval_bare_aggregate and > > > > cxx_eval_store_expression > > > > do > > > > no

Re: [PATCH] c++: Fix constexpr evaluation of self-modifying CONSTRUCTORs [PR94219]

2020-04-03 Thread Patrick Palka via Gcc-patches
On Fri, 3 Apr 2020, Jason Merrill wrote: > On 4/2/20 2:19 PM, Patrick Palka wrote: > > On Thu, 2 Apr 2020, Patrick Palka wrote: > > > > > This PR reveals that cxx_eval_bare_aggregate and cxx_eval_store_expression > > > do > > > not anticipate that a constructor element's initializer could mutate

Re: [PATCH] c++: Fix constexpr evaluation of self-modifying CONSTRUCTORs [PR94219]

2020-04-03 Thread Jason Merrill via Gcc-patches
On 4/2/20 2:19 PM, Patrick Palka wrote: On Thu, 2 Apr 2020, Patrick Palka wrote: This PR reveals that cxx_eval_bare_aggregate and cxx_eval_store_expression do not anticipate that a constructor element's initializer could mutate the underlying CONSTRUCTOR. Evaluation of the initializer could ad

Re: [PATCH] c++: Fix constexpr evaluation of self-modifying CONSTRUCTORs [PR94219]

2020-04-02 Thread Patrick Palka via Gcc-patches
On Thu, 2 Apr 2020, Patrick Palka wrote: > This PR reveals that cxx_eval_bare_aggregate and cxx_eval_store_expression do > not anticipate that a constructor element's initializer could mutate the > underlying CONSTRUCTOR. Evaluation of the initializer could add new elements > to > the underlying

[PATCH] c++: Fix constexpr evaluation of self-modifying CONSTRUCTORs [PR94219]

2020-04-02 Thread Patrick Palka via Gcc-patches
This PR reveals that cxx_eval_bare_aggregate and cxx_eval_store_expression do not anticipate that a constructor element's initializer could mutate the underlying CONSTRUCTOR. Evaluation of the initializer could add new elements to the underlying CONSTRUCTOR, thereby potentially invalidating any po