This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: sizeof() function result tests < -1


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]