blob: cdfdd9a27e460be8e69ace2fad97f7564936d847 [file] [log] [blame]
// PR c++/84588
// { dg-do compile { target c++11 } }
void foo()
{
if (int bar() {}); // { dg-error "condition declares a function" }
for (;int bar() {};); // { dg-error "condition declares a function" }
while (int bar() {}); // { dg-error "condition declares a function" }
if (int a[] {}); // { dg-error "condition declares an array" }
for (;int a[] {};); // { dg-error "condition declares an array" }
while (int a[] {}); // { dg-error "condition declares an array" }
}