This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52617] -Wconversion does not work for strlen
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 May 2012 13:11:56 +0000
- Subject: [Bug c/52617] -Wconversion does not work for strlen
- Auto-submitted: auto-generated
- References: <bug-52617-4@http.gcc.gnu.org/bugzilla/>
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.