|
|
|
|
|
by AdamH12113
1322 days ago
|
|
The article isn't really about C programming, it's about C's type system being used to define ABIs for foreign-language function calls. The size of e.g. an int can vary from platform to platform. Structure layouts are also platform-specific. Looking at a C library's header file by itself tells you nothing about what to actually put in the registers. I'm unclear on whether it would have been possible to do better without an implausible amount of standardization early in computing history. A low-level language that works on CPUs with different endianness and word size and pointer size and number of registers is by necessity going to be somewhat vague about calling conventions. |
|