[Bug c/52617] -Wconversion does not work for strlen
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 9 13:17:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52617
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |manu at gcc dot gnu.org
Resolution| |INVALID
--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-05-09 13:11:56 UTC ---
This is not a bug, but a feature. If the result of strlen fits in the target
type, no warning is given. If you make s1 a signed char and strlen a very very
long string, then you get an overflow warning.
More information about the Gcc-bugs
mailing list