Relationship between POSIX and C
Relationship between POSIX and C
Posted Jul 24, 2024 22:44 UTC (Wed) by farnz (subscriber, #17727)In reply to: C23 reference links by Wol
Parent article: GNU C Library 2.40 released
In older POSIX standards, the ISO C standard was brought in by reference, and then POSIX imposes requirements on top of ISO C. That's the way round that ISO envisages its standards being used (ISO provide a base, a higher level standard tightens up requirements in ways that work for a specific use case), but POSIX is imposing fewer and fewer requirements on top of ISO over time, which is why this is now a problem.
The ideal case would be for POSIX to impose requirements on realloc that aren't in conflict with ISO; if POSIX said "realloc(ptr, 0); must be the same as free(ptr); return malloc(0);", for example, that would not conflict with C17 or C23, but would tighten up the behaviour and make it defined in a reasonably sane way.
Posted Jul 25, 2024 8:01 UTC (Thu)
by Wol (subscriber, #4433)
[Link]
Cheers,
Relationship between POSIX and C
Wol
