public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/106370] New: enhancement: last statement of loop is continue is redundant ?
@ 2022-07-20 11:32 dcb314 at hotmail dot com
  2022-07-21 11:56 ` [Bug c/106370] " marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dcb314 at hotmail dot com @ 2022-07-20 11:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106370
           Summary: enhancement: last statement of loop is continue is
                    redundant ?
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Cppcheck has just been enhanced to detect the last statement of
a loop is a continue and mark it as a bad style. 

For example:

gcc/cp/init.cc:1439:4: style: 'continue' is redundant since it is the last
statement in a loop. [redundantContinue]

Source code is

    splice:
      *p = TREE_CHAIN (*p);
      continue;
    }

I feel this is a minor style issue which gcc may not be interested in,
but I thought it best to make others aware.

21 cases in the gcc source code. List available.

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

end of thread, other threads:[~2022-07-25 13:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20 11:32 [Bug c/106370] New: enhancement: last statement of loop is continue is redundant ? dcb314 at hotmail dot com
2022-07-21 11:56 ` [Bug c/106370] " marxin at gcc dot gnu.org
2022-07-21 20:34 ` dcb314 at hotmail dot com
2022-07-22  7:30 ` [Bug other/106370] " cvs-commit at gcc dot gnu.org
2022-07-22  7:31 ` marxin at gcc dot gnu.org
2022-07-25 13:30 ` jason at gcc dot gnu.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).