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 =
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.
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.
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
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