3

So, I know that an ABI for C++ would allow for a lot of nice things (e.g. pre-built libraries getting and returning smart pointers without fear of crashing and burning.)

Now, I realize that an ABI is a very-far-from-trivial thing, but - after 30 years of C++, and 25 years of C++ on 32-bit x86, how come there's not even a de-facto ABI standard for x86 (and x86_64) platforms?

Edit: More concretely, I'll limit the question the technical, rather than social and political, obstacles preventing the adoption of more-or-less uniform ABIs.

Community
  • 1
  • 1
einpoklum
  • 118,144
  • 57
  • 340
  • 684
  • 2
    I'm voting to close this question as off-topic because it's rhetorical. – The Paramagnetic Croissant May 09 '15 at 20:01
  • Visual Studio has a standard ABI, doesn't it? – Brian Bi May 09 '15 at 20:02
  • Voting to close as too broad (after edit). – n. m. could be an AI May 09 '15 at 20:04
  • Because every platform is different including smaller embedded systems that don't have graphical displays, hard drives or internet connections. – Thomas Matthews May 09 '15 at 20:05
  • @n.m.: Do you think I should split this into three questions then? – einpoklum May 09 '15 at 20:05
  • @ThomasMatthews: I did say the more common platforms... – einpoklum May 09 '15 at 20:05
  • You forgot to mention all the platforms based on the ARM processors and 16-bit microcontrollers. – Thomas Matthews May 09 '15 at 20:06
  • Then I would vote to close each one separately, two as off-topic (social, political) and one as too broad (technical). – n. m. could be an AI May 09 '15 at 20:08
  • By the way, there are more embedded systems out there than the *common* platforms. The C and C++ language ABI must conform to the embedded platforms, not only the popular or as you say "common". By the way, embedded systems are more common than desktop. – Thomas Matthews May 09 '15 at 20:08
  • @Brian Everything has *a* standard ABI. The trick is to have *the* standard ABI. – n. m. could be an AI May 09 '15 at 20:13
  • 3
    AFAIK, there is a de-facto standard ABI for C++ on x86-family of processors, the "Intel Itanium C++ ABI". That's what all main compilers (ICC, GCC, Clang, IBM, etc.) on all main platforms (Linux, Mac, Win., etc.) follow, except for MSVC. And this ABI has been pretty much set in stone for like 10 years now. Most standard library implementations are also pretty stable when it comes to binary compatibility between versions, with only MSVC as the odd man out, as usual. ABI-related issues are mostly a problem with "exotic" platforms (embedded systems, etc.) or worthless compilers like MSVC. – Mikael Persson May 09 '15 at 20:43

0 Answers0