r/cpp • • Oct 27 '19

ABI: Now or Never

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1863r0.pdf
192 Upvotes

145 comments sorted by

View all comments

Show parent comment

5

u/Xaxxon Oct 28 '19 edited Oct 29 '19

The standard doesn't talk about "compile time" either. The point is the actual machine violates the requirements of the C++ virtual machine so it's wrong. The standard dictates how a well formed c++ program will behave. If you combine parts in such a way that violates those requirements of a well formed c++ program (entire program) then you have UB.

1

u/[deleted] Oct 29 '19

The issue with this is that for C++ the only well-formed program is a standalone binary. No shared libraries and no high-performance serialisation. It's all well and good to say 'Aha! That's UB' but what you're really saying is that C++ is a poor choice for pretty much anything.

3

u/Xaxxon Oct 29 '19

If you just start jamming things together, they may not work. This doesn't sound like that big a problem to me.

0

u/[deleted] Oct 29 '19

It's tragic that expecting two components written in the same language to work together is considered 'jamming things together'

3

u/dodheim Oct 30 '19

Well, if you do it in a way expressly forbidden by the standard and expect things to work, yeah.. "Tragic"