sizeof() function result tests < -1

Horst von Brand vonbrand@sleipnir.valparaiso.cl
Sat Jan 8 01:38:00 GMT 2000


Richard Sharman <richard_sharman@Mitel.COM> said:
> On a sparc and a 386,  although sizeof(int) returns 4 when used in an
> assignment, the test  sizeof(int) < -1   returns true.

sizeof returns an unsigned, and -1 is cast to that for the < ...
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viña del Mar, Chile                               +56 32 672616


More information about the Gcc-bugs mailing list