4 ms·
No, the ABI issue is fundamentally there regardless of what compilers did or didn't do. If you have an interface that has a function that e.g. takes an intmax_
by AnssiH 4y ago
No, the ABI issue is fundamentally there regardless of what compilers did or didn't do.
If you have an interface that has a function that e.g. takes an intmax_t parameter (and even the C standard has those, e.g. imaxabs()), increasing intmax_t size (ABI change) would break existing callers.
So you can only change intmax_t size if you do not care about ABI stability.
- avar 4y agoExactly, and the way "intmax_t" was previously defined in C99 implied that you needed to break that ABI compatibility if you introduced larger integer types.
- gpderetta 4y agoAre you saying that the standard should attempt to impose requirements to non-conforming compiler modes? How would that even work?
- avar 4y agoI'm saying that if you wrote conforming C99 code that made the assumptions C99 guaranteed your code will be subtly broken by C23. Whether that was a worthwhile trade-off is another matter.
- gpderetta 4y agoTo be fair C23 is simply standardising the status quo. There is no point in having a standard if nobody implements it.