Ignoring undefined behaviour
Ignoring undefined behaviour
Posted Oct 31, 2024 8:20 UTC (Thu) by milesrout (subscriber, #126894)In reply to: Ignoring undefined behaviour by khim
Parent article: realloc() and the oversize importance of zero-size objects
This is not true. POSIX.1-2024 says in Chapter 1 of Volume 2 (https://pubs.opengroup.org/onlinepubs/9699919799/function...):
>This volume of POSIX.1-2024 is aligned with the following standards, except where stated otherwise:
>ISO C (C17)
> ISO/IEC 9899:2018, Programming Languages — C.
>Parts of the ISO/IEC 9899:2018 standard (hereinafter referred to as the ISO C standard) are referenced to describe requirements also mandated by this volume of POSIX.1-2024.
And earlier versions have similar language:
>Great care has been taken to ensure that this volume of POSIX.1-2017 is fully aligned with the following standards:
>ISO C (1999)
> ISO/IEC 9899:1999, Programming Languages - C, including ISO/IEC 9899:1999/Cor.1:2001(E), ISO/IEC 9899:1999/Cor.2:2004(E), and ISO/>IEC 9899:1999/Cor.3.
>Parts of the ISO/IEC 9899:1999 standard (hereinafter referred to as the ISO C standard) are referenced to describe requirements also mandated by this volume of POSIX.1-2017.
Note the 'hereinafter referred to as the ISO C standard' bit.
Posted Oct 31, 2024 8:24 UTC (Thu)
by milesrout (subscriber, #126894)
[Link]
Ignoring undefined behaviour