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

2020-03-18 Thread Patrick Palka via Gcc-patches
On Wed, 18 Mar 2020, Jason Merrill wrote: > On 3/18/20 11:58 AM, Patrick Palka wrote: > > On Wed, 18 Mar 2020, Patrick Palka wrote: > > > > > On Tue, 17 Mar 2020, Jason Merrill wrote: > > > > > > > On 3/16/20 1:39 PM, Patrick Palka wrote: > > > > > In this PR, we are performing constexpr

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

2020-03-18 Thread Jason Merrill via Gcc-patches
On 3/18/20 11:58 AM, Patrick Palka wrote: On Wed, 18 Mar 2020, Patrick Palka wrote: On Tue, 17 Mar 2020, Jason Merrill wrote: On 3/16/20 1:39 PM, Patrick Palka wrote: In this PR, we are performing constexpr evaluation of a CONSTRUCTOR of type union U which looks like {.a=foo (&)}.

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

2020-03-18 Thread Patrick Palka via Gcc-patches
On Wed, 18 Mar 2020, Patrick Palka wrote: > On Tue, 17 Mar 2020, Jason Merrill wrote: > > > On 3/16/20 1:39 PM, Patrick Palka wrote: > > > In this PR, we are performing constexpr evaluation of a CONSTRUCTOR of > > > type > > > union U which looks like > > > > > >{.a=foo (&)}. > > > > > >

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

2020-03-18 Thread Patrick Palka via Gcc-patches
On Tue, 17 Mar 2020, Jason Merrill wrote: > On 3/16/20 1:39 PM, Patrick Palka wrote: > > In this PR, we are performing constexpr evaluation of a CONSTRUCTOR of type > > union U which looks like > > > >{.a=foo (&)}. > > > > Since the function foo takes a reference to the CONSTRUCTOR we're

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

2020-03-17 Thread Jason Merrill via Gcc-patches
On 3/16/20 1:39 PM, Patrick Palka wrote: In this PR, we are performing constexpr evaluation of a CONSTRUCTOR of type union U which looks like {.a=foo (&)}. Since the function foo takes a reference to the CONSTRUCTOR we're building, it could potentially modify the CONSTRUCTOR from under us.

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

2020-03-16 Thread Patrick Palka via Gcc-patches
In this PR, we are performing constexpr evaluation of a CONSTRUCTOR of type union U which looks like {.a=foo (&)}. Since the function foo takes a reference to the CONSTRUCTOR we're building, it could potentially modify the CONSTRUCTOR from under us. In particular since U is a union, the