>From the fact that you can write a code like that does not follow that
you should. Such C should be classified as a bug on its own (and I am
not talking about trivially missing 'c' before '4' in 't' declaration).
The first question is how do you know that sizeof(t) is the same as
sizeof(unsigned long) and that they have the same layout in memory?
The answer is "you don't" on both counts and if you think that you do
you are deeply mistaken.
Even if you guessed right on some particular platform then coding like
that you have a pretty good chance that you will cause an unaligned
access. i386 is much less sensitive than Alpha to that but will take
a performance hit in any case. On Alpha you will also find nastygrams
in you Linux log files but this is the way how Linux kernels are coded.
It looks like that egcs-1.1.2 should get extra brownie points for
exposing shoddy programming practices. :-)
Michal
-
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/