LWN.net Logo

Language misfeature

Language misfeature

Posted Jun 22, 2011 22:22 UTC (Wed) by vapier (subscriber, #15768)
In reply to: Language misfeature by eru
Parent article: A hole in crypt_blowfish

in the GCC world, "implementation" doesn't stop at the "all GCC ports are the same". it can differ between architectures, and even between OS targets for the same architecture.

$ grep DEFAULT_SIGNED_CHAR gcc/config/*/*.h | grep -c 0
19
$ grep DEFAULT_SIGNED_CHAR gcc/config/*/*.h | grep -c 1
28

e.g. mips is generally a 1, but mips/irix is 0

long story short, if you want a signed char, then you better use "signed char"


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds