[Bug c++/97234] Constexpr class-scope array initializer referencing previous elements

botond at mozilla dot com gcc-bugzilla@gcc.gnu.org
Tue Aug 17 05:40:19 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97234

--- Comment #2 from Botond Ballo <botond at mozilla dot com> ---
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.


More information about the Gcc-bugs mailing list