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: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Mar 2012 14:50:34 +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
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-19 14:50:34 UTC ---
You should get two warnings if you use -fno-builtin
But do you really want it? The compiler is smart enough to know that
strlen("bla") returns 3 so the warning would be wrong.