Re: [PATCH] C undefined behavior fix

Edgar Toernig
2002-01-03T15:47:56Z

David Woodhouse wrote:
>
> What part of 'undefined behaviour' is so difficult for people to understand?

The behaviour is undefined by the C standard. But the mentioned
pointer arithmetic is defined in the environment where it has been
used. GCC tries to optimize undefined C-standard behaviour. And
IMHO that's the point. It may optimize defined behaviour and should
not touch things undefined by the standard.

Ciao, ET.

PS: Hey, we are talking about C, the de luxe assembler! *g*