[PATCH] C undefined behavior fix

Paul Koning pkoning@equallogic.com
Sat Jan 5 08:34:00 GMT 2002


Excerpt of message (sent 4 January 2002) by Linus Torvalds:
> 
> On Fri, 4 Jan 2002, Richard Henderson wrote:
> >
> > The entire description is
> >
> >   3.4.1 implementation-defined behavior
> >   unspecified behavior where each implementation documents how
> >   the choice is made.
> 
> Right. But note how there _must_ be a choice. That's the part that says
> it's not "undefined", and is the only real difference between undefined
> and implementation-defined, wouldn't you agree?

I think you're mixing up "unspecified" and "undefined".

"Undefined" IS an instance of "implementation-defined".  Perhaps the
difficulty lies in the conflict between the intuitive (plain English)
meaning of "undefined" vs. the precise meaning of the technical term
"undefined" in the standard.  In standards, "undefined" is very
definitely NOT a synonym for "you haven't said what you're doing".
Rather, it's a synonym for "you've explicitly said that you don't
promise anything at all".

	paul




More information about the Gcc mailing list