This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
question about -Werror=strict-overflow
- From: JÄdrzej Dudkiewicz <jedrzej dot dudkiewicz at gmail dot com>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 17 May 2011 11:45:47 +0200
- Subject: question about -Werror=strict-overflow
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.