view gcc/testsuite/gcc.dg/do-empty.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* Test diagnostics for empty bodies in do / while.  */
/* { dg-do compile } */
/* { dg-options "-Wempty-body" } */

void
f (int x)
{
  do
    ; /* { dg-warning "empty body in" } */
  while (x--);

  do
  {} /* { dg-bogus "empty body in" } */
  while (++x < 10);
}