https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107735
--- Comment #4 from Andrew Pinski ---
(In reply to Jonathan Wakely from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > I wonder if this is because doing
> > constexpr const int *v1 = &array[3];
> >
> > is valid and well defined.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107735
--- Comment #3 from Jonathan Wakely ---
(In reply to Andrew Pinski from comment #2)
> I wonder if this is because doing
> constexpr const int *v1 = &array[3];
>
> is valid and well defined.
It's not, but &array.data()[3] is.
I agree that's p
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107735
--- Comment #2 from Andrew Pinski ---
I wonder if this is because doing
constexpr const int *v1 = &array[3];
is valid and well defined.
Even clang gives two different error messages:
:3:21: error: constexpr variable 'v1' must be initialized b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107735
Jonathan Wakely changed:
What|Removed |Added
Last reconfirmed||2022-11-17
Status|UNCONFI