This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/55896] Annoying compiler warning


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]