RE: [PATCH] C undefined behavior fix

From: Paul Mackerras (
Date: Thu Jan 03 2002 - 05:49:32 EST

Bernard Dautrevaux writes:

> OH... are you saying that the Linux kernel is not writtent in ANSI C? AFAICR

No, in fact the kernel isn't written in ANSI C. :)
If nothing else, the fact that it uses a lot of gcc-specific
extensions rules that out. And it assumes that you can freely cast
pointers to unsigned longs and back again. I'm sure others can add to
this list.

> the standard *requires* that the standard library functions have their
> standard meaning. So if the Linux kernel expects them to have some special
> meaning it is *non-conforming* and then you need a *special* compiler,
> understanding this.

Sure the kernel is non-conforming. "Conforming" means that the
program will run the same on any architecture, and the Linux kernel
surely won't do that - it won't get very far on a PDP-10, I can assure
you. :)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jan 07 2002 - 21:00:20 EST