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.