[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2023-06-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #12 from Andrew Pinski --- (In reply to Jiang An from comment #11) > This looks like CWG issue 2558 (currently unresolved). > > https://cplusplus.github.io/CWG/issues/2558.html It was voted in a few months after this comment was

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2022-11-22 Thread de34 at live dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 Jiang An changed: What|Removed |Added CC||de34 at live dot cn --- Comment #11 from

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2022-11-21 Thread dysnomia.eris at online dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 dysnomia.eris at online dot de changed: What|Removed |Added CC||dysnomia.eris at online

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2021-09-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #9 from Andrew Pinski --- The array is not needed to reproduce this though: struct Foo { constexpr Foo() {} }; union U { // struct {} monostate = {}; Foo foo; constexpr U() {} }; constexpr U s;

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2021-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-02 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #7 from Luke Dalessandro --- Thank you, sorry for the confusion.

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-02 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #6 from Jakub Jelinek --- All I'm saying is that I believe your code is not valid C++17, but is valid C++20 and that for C++20 we have a compiler bug we need to fix.

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-02 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #5 from Luke Dalessandro --- Ugh... replying to myself. > You can do Foo foo = Foo(); and it compiles. >> 1. I can't do `Foo foo = Foo();` because the purpose of the union is to >> allocate uninitialized storage for the `Foo`

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-02 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #4 from Luke Dalessandro --- Hi Jakob, Thank you for looking at this. I restructured the code sample according to your suggestions and it is available here https://godbolt.org/z/P1bMEz. I don't understand a couple of things that you

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-02 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 Jakub Jelinek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-02 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-01 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #1 from Luke Dalessandro --- (In reply to Luke Dalessandro from comment #0) > GCC currently rejects the following code snippet, where it infers the > constexpr definition of V as non-constexpr. The definition of `v`, not the type