-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Incompatibility between clang++ 14 and libstdc++ 12 #54463
Comments
This looks like a clang issue and not a libc++ issue to me. Am I correct @berolinux? |
yes, libc++ isn't involved, this happens when using libstdc++ from gcc 12. clang doesn't implement a language extension implemented in gcc and icc, which libstdc++ assumes is there if GNUC >= 5 |
I don't know exactly which label should be used for clang. I hope someone who knows it adds the correct one. |
Just for additional context, the gcc folks implemented a workaround on their side for this recently: gcc-mirror/gcc@e63ac86 |
Could you give some context about why you're using |
Workaround for legacy cruft doing the likes of
gcc 5 was released in 2015 -- lots of progress has been made in both gcc and clang since then. And a lot of things never assumed there would be other compilers than gcc, so they use |
I think the last time the default was discussed was https://discourse.llvm.org/t/whats-the-rationale-to-continue-declare-compatibility-with-gcc-4-2-1/52530 . See also https://discourse.llvm.org/t/rfc-bump-up-clangs-gnuc-minor/23084 ; in particular, clang still doesn't implement __builtin_va_arg_pack(), which is probably still a blocker for messing with the default here. |
This sample code:
works perfectly when built with gcc 12.0, or when built with clang 14 using libc++ or libstdc++ versions prior to 12.0 -- but when using clang with libstdc++ 12.0 (20220313 snapshot), it results in
The text was updated successfully, but these errors were encountered: