-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(parse): enable compiling with Libc++ in C++23+ #818
Conversation
Thanks! I'm not sure these are actual order dependency bugs in |
I'm also looking forward to it! |
Seems like they are in C++23.
|
I tried with GCC 13 in C++23 mode but wasn't able to find such a problem. It did give one error though, which no other compiler reported and I can't see if there's really a problem... the error is:
The
which is lowered to this:
You last took a pass at the UFCS macros... do you see any actual possible dangling that could be happening? |
I reduced the lambda to just [&]<typename Obj> [[nodiscard]] (Obj && obj)
->decltype(auto) {
return std::forward<decltype(obj)>(obj).template_arguments();
}((*cpp2::assert_not_null(meta))) It looks fine. |
The effect of |
Make grammar productions all <90 characters (they mostly were anyway, and some long names just weren't needed) I changed some that ended in _-list_ to just end in _s_ (for plural), but left some like _expression-list_ because they were already short and read better with a dash (I think _expression-list_ reads better than _expressions_, YMMV) Also added `-Wno-error=dangling-reference` to avoid a false positive in GCC 13; see #818 (comment)
Done in 9585ecc |
This most closely matches your error: https://stackoverflow.com/questions/77101074/possible-false-positive-from-wdangling-reference-using-g. |
Thanks, I just noticed that too and pushed 9aefcee Update: Yes, that seems to have fixed it. |
This works around possibly llvm/llvm-project#58206,
as pointed out at #462 (comment).
So now we can compile
cppfront
with Libc++ in C++23+.