public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/106620] New: Incorrectly thinks execution can continue after a return statement
@ 2022-08-15  8:55 nrk at disroot dot org
  2022-08-15 15:33 ` [Bug analyzer/106620] " dmalcolm at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: nrk at disroot dot org @ 2022-08-15  8:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106620

            Bug ID: 106620
           Summary: Incorrectly thinks execution can continue after a
                    return statement
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: nrk at disroot dot org
  Target Milestone: ---

Created attachment 53457
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53457&action=edit
sample code

Sample code (also attached) : https://godbolt.org/z/ez556Yd39

It thinks that memchr() is being called with null. But if `hay` was null, then
the function returns, so that's not possible. Removing the `|| nlen == 1`
silences the warning.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-16  2:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-15  8:55 [Bug analyzer/106620] New: Incorrectly thinks execution can continue after a return statement nrk at disroot dot org
2022-08-15 15:33 ` [Bug analyzer/106620] " dmalcolm at gcc dot gnu.org
2022-08-15 15:34 ` dmalcolm at gcc dot gnu.org
2022-08-16  2:06 ` nrk at disroot dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).