https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69029
Bug ID: 69029
Summary: [6 Regression] bogus -Wmisleading-indentation warning
on one-line loops
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
CC: dmalcolm at gcc dot gnu.org
Target Milestone: ---
markus@x4 tmp % cat while.cpp
int main() {
int i = 0;
do i++; while (i < 3);
}
markus@x4 tmp % g++ -Wall -c while.cpp
while.cpp: In function ‘int main()’:
while.cpp:3:11: warning: statement is indented as if it were guarded by...
[-Wmisleading-indentation]
do i++; while (i < 3);
^~~~~
while.cpp:3:3: note: ...this ‘do’ clause, but it is not
do i++; while (i < 3);
^~