3 ms·
To be precise, C does not have a defined ABI (the spec goes out of its way to avoid this). Platforms (OS+Arch) define a C ABI for their own tools. Since this AB
by ChrisSD 7y ago
To be precise, C does not have a defined ABI (the spec goes out of its way to avoid this). Platforms (OS+Arch) define a C ABI for their own tools. Since this ABI is required to interop with the OS APIs, this will usually become the de-facto standard for the platform.
This might seem like nitpicking but it's an important distinction because you can't assume that C data structures can be passed between different platforms (e.g. over a network or even stored in a filesystem).
- jeffdavis 7y agoWhat is the right way to say that without sounding too pedantic every time? "Most platforms define a stable C ABI"?
- pjmlp 7y agoThe only platforms that define a stable C ABI are those whose OS is written in C and exposes a C API to userspace. Symbian did not had a C ABI for example, nor do mainframes, in ChromeOS or Android you also don't have a C ABI exposed to userspace, in Windows a C ABI also won't help you much if you need to speak COM or now UWP.