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
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
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
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;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665
Andrew Pinski changed:
What|Removed |Added
Ever confirmed|0 |1
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665
--- Comment #7 from Luke Dalessandro ---
Thank you, sorry for the confusion.
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.
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`
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665
Jakub Jelinek changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
--- Comment
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
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
12 matches
Mail list logo