]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/cond1.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / cond1.C
CommitLineData
18759120
PC
1// PR c++/84588
2// { dg-do compile { target c++11 } }
3
4void 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}
This page took 1.374079 seconds and 5 git commands to generate.