Standard library implementations do not necessarily share the same ABI, but it is possible to interoperate between libc++ and libstdc++, and libstdc++ maintains ABI compatibility across different versions.
And, to be pedantic, C does not provide a stable, standard ABI. It is the platforms themselves that provide this ABI standard, and these platforms equally provide a C++ ABI standard. So C++ ABI compatibility is no more or less a problem than C ABI compatibility.
It's analogous to Java and Scala; each has an ABI, but it's easier to tell when the former breaks ABI than the latter.
There is a difference, but the difference is in complexity, not availability.
That's not entirely true. C++ has a stable ABI: compiling a library with GCC and reusing it with clang or ICC is doable and commonly done nowadays.
The problem with the C++ ABI is that it is shamefully fragile. It is extremely easy to break an ABI without wanting it in C++, even for experts.
https://community.kde.org/Policies/Binary_Compatibility_Issu...
Neither the C Language Standard nor the C++ Language Standard specify an ABI.
Perhaps we should distinguish between a Langage-Standard ABI vs. a per-platform de facto ABI.
I think the GP's comment holds for the latter definition.
Even for C++: gcc has been mostly compatible, but not unreasonably so. MSVC was traditionally not at all, but has recently been for 2 or 3 major versions in a row. I think MSVC will eventually break it again though, but at least they break it way less often than before (and breaking can also have advantages).
C++ implementations have name mangling because they live on systems designed for C, which don’t allow symbols such as int max(int,int)
C implementations (would) need name mangling if they ran on a system that used case-insensitive comparisons on symbol names, or on ones whose character set is smaller than that allowed in C symbols (I know examples of neither, but Wikipedia has an example that encodes the calling convention in the symbol name: https://en.wikipedia.org/wiki/Name_mangling#C)
”If name mangling was standardized, could I link code compiled with compilers from different compiler vendors?
Short answer: Probably not.”
(click link for more info)
yet the real life answer is that I can link C++ code built with three different compiler on linux (gcc / clang / icc) and three / two on windows (clang / cl.exe / icc or clang / gcc)