[PATCH] C undefined behavior fix

Linus Torvalds torvalds@transmeta.com
Sat Jan 5 11:53:00 GMT 2002


On Sat, 5 Jan 2002, Florian Weimer wrote:
>
> Standard C has neither a concept of machine addresses, nor does the
> standard require a uniform, linear address space.

You haven't read the fine print. The C standard _does_ say:

  "The mapping functons for converting a pointer to an integer or an
   integer to a pointer are inteded to be consistent with the addressing
   structure of the execution environment."

It can't be more specific, because the standard doesn't go into what those
execution environments actually _are_. But it's pretty clear what the
thing is talking about.

No hallucinations.

			Linus



More information about the Gcc mailing list