[Bug c++/93989] [c++20] Error initializing trivial types in constexpr constructor

2021-11-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989 --- Comment #8 from Jonathan Wakely --- Further reduced: struct bstring { char buf {}; char* ptr = buf; }; void test01() { constexpr bstring v1{}; }

[Bug c++/93989] [c++20] Error initializing trivial types in constexpr constructor

2021-11-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989 Jonathan Wakely changed: What|Removed |Added Keywords||diagnostic --- Comment #7 from

[Bug c++/93989] [c++20] Error initializing trivial types in constexpr constructor

2021-11-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989 --- Comment #6 from Jonathan Wakely --- This works fine, i.e. just remove the constexpr specifiers on the local variables: consteval void test01() { typedef constexpr_allocator alloc_type; typedef bstring test_type; alloc_type a1(1);

[Bug c++/93989] [c++20] Error initializing trivial types in constexpr constructor

2020-03-02 Thread kingoipo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989 --- Comment #5 from Michael de Lang --- Created attachment 47953 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47953=edit self-contained minimal test case I managed to reduce the test case to a single file, which also produces the two

[Bug c++/93989] [c++20] Error initializing trivial types in constexpr constructor

2020-03-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/93989] [c++20] Error initializing trivial types in constexpr constructor

2020-03-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989 --- Comment #3 from Marek Polacek --- Unfortunately that generates literally hundreds of errors when compiled with -std=c++20 so it's nearly impossible for me to analyze it and see if there's a real problem.

[Bug c++/93989] [c++20] Error initializing trivial types in constexpr constructor

2020-03-01 Thread kingoipo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989 --- Comment #2 from Michael de Lang --- Created attachment 47943 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47943=edit save-temps copy_assign_constexpr.ii

[Bug c++/93989] [c++20] Error initializing trivial types in constexpr constructor

2020-03-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment