This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/58240] GCC optimize strncmp when N=1 incorrectly
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 25 Aug 2013 17:56:35 +0000
- Subject: [Bug c/58240] GCC optimize strncmp when N=1 incorrectly
- Auto-submitted: auto-generated
- References: <bug-58240-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58240
--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
-fno-builtin (or some better such option)?
strncmp is a standard function, your code redefining it has undefined behavior.
gcc optimizes based on the standard behavior of the function.