[Bug c++/101557] the value of '' is not usable in a constant expression

2023-04-16 Thread federico at kircheis dot it via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101557 --- Comment #5 from Federico Kircheis --- Today I just found a possible workaround that involves macros and lambdas... struct node { const char* d; const node& left; }; #define LEAF(a) []()-> const node&{ constexpr static auto a =

[Bug c++/101557] the value of '' is not usable in a constant expression

2021-07-21 Thread federico.kircheis at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101557 --- Comment #4 from Federico Kircheis --- Indeed. I just checked the latest versions. I wonder if there is a common cause that makes this recursive data structure harder to evaluate at compile time.

[Bug c++/101557] the value of '' is not usable in a constant expression

2021-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101557 --- Comment #3 from Andrew Pinski --- (In reply to Federico Kircheis from comment #2) > clang does not reject it: > > https://godbolt.org/z/8Mq1e3o3j clang 11 does reject it but clang 12 does NOT reject it.

[Bug c++/101557] the value of '' is not usable in a constant expression

2021-07-21 Thread federico.kircheis at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101557 --- Comment #2 from Federico Kircheis --- clang does not reject it: https://godbolt.org/z/8Mq1e3o3j

[Bug c++/101557] the value of '' is not usable in a constant expression

2021-07-21 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101557 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1