News for hackers. Stuff that matters.
Re:C++ 20: The Core Language by gpderetta on Tuesday November 05, 2019 @05:53PM (#21457664)
No, GCC and clang are fully ABI compatible (modulo bugs of course). Libstc++ and libc++ are not, so use whatever is the standard library of your platform (i.e the default for calng and GCC) and things work fine.
Re:C++ 20: The Core Language by gumby on Tuesday November 05, 2019 @06:19PM (#21457911)
Oh I see; we were speaking past each other.

Yes, gcc and clang use the same platform API so if they use the same headers (libstc++ or libc++) then they will indeed use identical structure layout etc.

I meant a "gcc-native" toolchain (gcc + libstdc++) vs "llvm native" (clang++ + libc++) having different layout (and there is even some interoperability between them thanks to work by the llvm team). I realize my need to do this (to try to minimize opting bugs) is a special case, and probably unusual.

Re:C++ 20: The Core Language by umanwizard on Wednesday November 06, 2019 @03:33AM (#21460681)
There is not really anything more “native” about using libc++ with clang as opposed to libstdc++ other than the fact that they happened to be developed by the same project. Using clang with libstdc++ is extremely mainstream and normal.

Actually I would bet that even among clang users, libstdc++ is used more commonly on GNU/Linux (IDK for sure, but it’s my hunch).

Re:C++ 20: The Core Language by gpderetta on Wednesday November 06, 2019 @07:11AM (#21461713)
parent says they wants to use libc++ to catch more bugs. Which is a reasonable use case.