| 1 |
// PR c++/84588 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
void foo() |
| 5 |
{ |
| 6 |
if (int bar() {}); // { dg-error "condition declares a function" } |
| 7 |
|
| 8 |
for (;int bar() {};); // { dg-error "condition declares a function" } |
| 9 |
|
| 10 |
while (int bar() {}); // { dg-error "condition declares a function" } |
| 11 |
|
| 12 |
if (int a[] {}); // { dg-error "condition declares an array" } |
| 13 |
|
| 14 |
for (;int a[] {};); // { dg-error "condition declares an array" } |
| 15 |
|
| 16 |
while (int a[] {}); // { dg-error "condition declares an array" } |
| 17 |
} |