Sujet : Re: Can you please verify that the analysis of these C functions is correct?
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.c comp.lang.c++Date : 22. Jun 2024, 22:49:47
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v57gtr$3un26$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla Thunderbird
On 6/22/24 3:17 PM, Chris M. Thomasson wrote:
On 6/22/2024 10:58 AM, Bonita Montero wrote:
...
Most UB is there to allow optimizations, also in this case.
I've got no problem with that.
>
>
Humm. Sounds reasonable. UB is there to be defined by a non-conforming
compiler? ;^)
By definition, non-conforming implementations can always do whatever
they like, regardless of whether the code has undefined behavior, merely
unspecified behavior, or even standard-defined behavior.
UB is for the benefit of conforming implementations. It gives them
permission to handle code that has UB any way they want, without
sacrificing conformance.