The first form has no undefined behavior. Since p may be NULL, in general the compiler is not allowed to make that transformation unless it can prove bar never gets called with p=NULL and n=0 (which it probably can't).…
This is a necessary consequence (in the formal logic sense) of the "principle of explosion"[1] for optimizing compilers. If the compiler assumes some undefined behavior does not occur, but in fact that undefined…
> I cannot say I have ever written anything that ran into or caused undefined behavior. And I have programmed for a long time. Perhaps this is true, or perhaps you are just unaware of the undefined behavior you have…
Yes, thank you. It's clear these points are incorrect if you consider the purpose of undefined behavior. Compilers are allowed to assume undefined behavior is never invoked (which may be useful for optimization and…
No there aren't. I have no doubt the people you describe exist, but "vegan hunter" is a complete oxymoron unless you're talking about "hunting" berries. Even descriptivist dictionaries don't include any definition of…
The first form has no undefined behavior. Since p may be NULL, in general the compiler is not allowed to make that transformation unless it can prove bar never gets called with p=NULL and n=0 (which it probably can't).…
This is a necessary consequence (in the formal logic sense) of the "principle of explosion"[1] for optimizing compilers. If the compiler assumes some undefined behavior does not occur, but in fact that undefined…
> I cannot say I have ever written anything that ran into or caused undefined behavior. And I have programmed for a long time. Perhaps this is true, or perhaps you are just unaware of the undefined behavior you have…
Yes, thank you. It's clear these points are incorrect if you consider the purpose of undefined behavior. Compilers are allowed to assume undefined behavior is never invoked (which may be useful for optimization and…
No there aren't. I have no doubt the people you describe exist, but "vegan hunter" is a complete oxymoron unless you're talking about "hunting" berries. Even descriptivist dictionaries don't include any definition of…