[Bug c/55896] Annoying compiler warning
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 18 11:38:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55896
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
But there is && content_1[0] == '[' guard around it, but likely just no
optimization figures out that the inlined w_strlen (why aren't you using
strlen???) will always return at least 1 and thus the jump threaded variant
with zero length is dead. I suppose instead of using w_strlen (contents_1) - 1
you could just use w_strlen (contents_1 + 1) and the warning could go away.
More information about the Gcc-bugs
mailing list