PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / do-empty.c
blob350261d48ed831fc5b5189fa6424bc3bbf18c6ee
1 /* Test diagnostics for empty bodies in do / while. */
2 /* { dg-do compile } */
3 /* { dg-options "-Wempty-body" } */
5 void
6 f (int x)
8 do
9 ; /* { dg-warning "empty body in" } */
10 while (x--);
13 {} /* { dg-bogus "empty body in" } */
14 while (++x < 10);