portability question



Hi everyone,

I just started reading some of the GLib source code
for the first time and I have noticed that the code
often makes "nonportable" assumptions about the C
implementation like arbitrary pointer/int
interchangability, twos-complement representation of
negative integers, "all-zeros" representation of a
null pointer.

I say "nonportable" in quotes, because I suspect that
these things actually are portable to all platforms of
current interest, but still I wonder why the code was
written this way when it's really not difficult to
write the code without making these assumptions.

Are there any reasons?


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]