[Bug c++/97234] Constexpr class-scope array initializer referencing previous elements
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97234 Jonathan Wakely changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed||2021-08-17 --- Comment #4 from Jonathan Wakely --- Yes, I think this one is too.
[Bug c++/97234] Constexpr class-scope array initializer referencing previous elements
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97234 Botond Ballo changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=99059 --- Comment #3 from Botond Ballo --- Bug 99059 is similar (involving C++17 "inline" rather than constexpr) and Jonathan Wakely said it's a bug.
[Bug c++/97234] Constexpr class-scope array initializer referencing previous elements
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97234 --- Comment #2 from Botond Ballo --- I believe it's valid because the point of declaration of a variable is just before its initializer (https://timsong-cpp.github.io/cppwp/n4861/basic.scope.pdecl#1), and thus the variable should be in scope in its initializer. But I'm not a wording expert and it's possible I'm mistaken, or overlooking something else that would make this invalid.
[Bug c++/97234] Constexpr class-scope array initializer referencing previous elements
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97234 --- Comment #1 from Andrew Pinski --- ICC and MSVC reject it similar to GCC even. Are you sure this is valid?