Re: [PATCH] c++: Fix wrong-code with non-constexpr constructor [PR93169]

2020-02-19 Thread Jason Merrill
On 2/19/20 11:12 PM, Marek Polacek wrote: In order to detect modifying constant objects in constexpr evaluation, which is UB, in r10-2655 I added code that sets TREE_READONLY on CONSTRUCTORs of const-qualified objects after they have been fully constructed. But I never made sure that what we're

[PATCH] c++: Fix wrong-code with non-constexpr constructor [PR93169]

2020-02-19 Thread Marek Polacek
In order to detect modifying constant objects in constexpr evaluation, which is UB, in r10-2655 I added code that sets TREE_READONLY on CONSTRUCTORs of const-qualified objects after they have been fully constructed. But I never made sure that what we're setting the flag on actually is a CONSTRUCTO