Re: [PATCH] c++: cxx_eval_array_reference and empty elt type [PR101194]

2021-06-29 Thread Jason Merrill via Gcc-patches
On 6/29/21 2:25 PM, Patrick Palka wrote: Here the initializer for 'x' is represented as an empty CONSTRUCTOR due to its empty element type. So during constexpr evaluation of the ARRAY_REF 'x[0]', we end up trying to lazily value initialize the omitted element at index 0, which fails because the

[PATCH] c++: cxx_eval_array_reference and empty elt type [PR101194]

2021-06-29 Thread Patrick Palka via Gcc-patches
Here the initializer for 'x' is represented as an empty CONSTRUCTOR due to its empty element type. So during constexpr evaluation of the ARRAY_REF 'x[0]', we end up trying to lazily value initialize the omitted element at index 0, which fails because the element type is not default initializable.