Re: ANSI C clarifications, with citations (was Re: [patch-2.4

Rusty Russell (rusty@linuxcare.com.au)
Tue, 27 Jun 2000 17:35:34 +1000


In message <200006270409.VAA32165@work.bitmover.com> you write:
> > sizeof(short) == 2
> > 3. sizeof(int) == 4 (for real Linux, not the 8088 hack)
> > 4. sizeof(long) == sizeof(void *)
> > 5. (sizeof(long) == 4) | (sizeof(long) == 8)
> > 6. sizeof(long long) == 8 (good for 10 years at least)
> > 7. You can freely cast between any two pointer types
> > 8. You can freely cast between long and any pointer type
>
> Huh? There are lots of machines for which one or more of these
> things are not true and #8 is amazing in it's shortsightedness.

Larry, sorry to disappoint. Albert's full list fairly closely
corresponds with existing kernel assumptions. Attacking the messenger
won't change this; I'd like to add:

11. Assignments of fundamental types are assumed to be atomic.

> What part of Moore's Law do you not understand?

I understand the part which says Alpha was released ~92, and we chew
up a bit every 18 months, so we have to rewrite Linux in 2040. We
have to survive 2038 first.

If you're worried, take it up personally with Linus.

G'luck,
Rusty.

--
Hacking time.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/