Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.old-deja/g++.mike/p7868.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 // { dg-do assemble } |
2 // prms-id: 7868 | |
3 | |
4 struct DIAGTYP { | |
5 }; | |
6 struct DIAGTYP1 { | |
7 struct DIAGTYP; // { dg-message "" } forward declaration | |
8 void bar() { new struct DIAGTYP; } // { dg-error "" } undefined | |
9 void foo() { new struct DIAGTYP1; } | |
10 }; | |
11 | |
12 int main () { | |
13 struct DIAGTYP; // { dg-message "" } forward declaration | |
14 struct DIAGTYP *lerror_desc; | |
15 lerror_desc= new struct DIAGTYP; // { dg-error "" } undefined | |
16 } | |
17 | |
18 void foo () { | |
19 struct DIAGTYP *lerror_desc; | |
20 lerror_desc= new struct DIAGTYP; | |
21 } |