Re: [PATCH v2] c++: Catch indirect change of active union member in constexpr [PR101631]

2023-09-20 Thread Jason Merrill
On 9/19/23 20:55, Nathaniel Shead wrote: On Tue, Sep 19, 2023 at 05:25:20PM -0400, Jason Merrill wrote: On 9/1/23 08:22, Nathaniel Shead wrote: On Wed, Aug 30, 2023 at 04:28:18PM -0400, Jason Merrill wrote: On 8/29/23 09:35, Nathaniel Shead wrote: This is an attempt to improve the constexpr

Re: [PATCH v2] c++: Catch indirect change of active union member in constexpr [PR101631]

2023-09-19 Thread Nathaniel Shead
On Tue, Sep 19, 2023 at 05:25:20PM -0400, Jason Merrill wrote: > On 9/1/23 08:22, Nathaniel Shead wrote: > > On Wed, Aug 30, 2023 at 04:28:18PM -0400, Jason Merrill wrote: > > > On 8/29/23 09:35, Nathaniel Shead wrote: > > > > This is an attempt to improve the constexpr machinery's handling of > >

Re: [PATCH v2] c++: Catch indirect change of active union member in constexpr [PR101631]

2023-09-19 Thread Jason Merrill
On 9/1/23 08:22, Nathaniel Shead wrote: On Wed, Aug 30, 2023 at 04:28:18PM -0400, Jason Merrill wrote: On 8/29/23 09:35, Nathaniel Shead wrote: This is an attempt to improve the constexpr machinery's handling of union lifetime by catching more cases that cause UB. Is this approach OK? I'd

[PATCH v2] c++: Catch indirect change of active union member in constexpr [PR101631]

2023-09-17 Thread Nathaniel Shead via Gcc-patches
Ping for https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629084.html -- >8 -- This patch adds checks for attempting to change the active member of a union by methods other than a member access expression. To be able to properly distinguish `*() = ` from `u.a = `, this patch redoes the

[PATCH v2] c++: Catch indirect change of active union member in constexpr [PR101631]

2023-09-01 Thread Nathaniel Shead via Gcc-patches
On Wed, Aug 30, 2023 at 04:28:18PM -0400, Jason Merrill wrote: > On 8/29/23 09:35, Nathaniel Shead wrote: > > This is an attempt to improve the constexpr machinery's handling of > > union lifetime by catching more cases that cause UB. Is this approach > > OK? > > > > I'd also like some feedback