Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
gcc
/
testsuite
/
g++.dg
/
warn
/
do-empty.C
blob: 350261d48ed831fc5b5189fa6424bc3bbf18c6ee [
file
] [
log
] [
blame
]
/* 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
);
}