[Zlib-devel] #elif is not portable on pre-ANSI compilers
Greg Roelofs
newt at pobox.com
Thu Apr 17 10:05:02 EDT 2003
> I can see that now - so we need unsigned short after all.
That's actually unsigned long on most systems. Unsigned shorts are
typically 16 bits.
> I wish to add that even the use of 0xff00 should be accompanied by 'U'
> (0xff00U), for the sake of 16-bit platforms. Even if the compiled code
> is still correct, 0xff00 alone is a negative value that might cause
> unnecessary warnings; after all, we are dealing with unsigned values.
'U' is an ANSIism. I think it's widely supported on non-ANSI compilers,
but I'd bet there are some that don't grok it.
If it ain't broke...
Greg
More information about the Zlib-devel
mailing list