question about -Werror=strict-overflow

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

 



I see the following warning:

"assuming signed overflow does not occur when simplifying conditional
to constant"

pointing to a line containing:

if (iRv == SSLSOCK_S_SUCCEED)

where:

typedef signed int TInt32;
TInt32 iRv;
#define SSLSOCK_S_SUCCEED 0

Is there any chance for overflow?


I'm using gcc-4.6.0 and warning appears as early as
-Wstrict-overflow=2 (there is still 3, 4 and 5 - I don't even want to
go there).

In preprocessed sources, this is: "if (iRv == 0)", so not rogue
#defines this time.
-- 
JÄdrzej Dudkiewicz

I really hate this damn machine, I wish that they would sell it.
It never does just what I want, but only what I tell it.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux