C99 testsuite readiness: Compile more tests with -std=gnu89
[official-gcc.git] / gcc / testsuite / obj-c++.dg / proto-lossage-5.mm
blob2a30bc2a9af641f14eda82186f86204d044f1a41
1 /* Do not lose references to forward-declared protocols.  */
2 /* { dg-do compile } */
3 // { dg-additional-options "-Wno-objc-root-class" }
4 @class MyBaseClass;
5 @class MyClassThatFails;
6 @protocol _MyProtocol;
8 @interface MyClassThatFails
9 - (MyBaseClass<_MyProtocol> *) aMethod;
10 @end
12 @interface MyBaseClass
13 @end
15 @protocol _MyProtocol
16 @end
18 @implementation MyClassThatFails
19 - (MyBaseClass<_MyProtocol> *) aMethod
21     return 0;
23 @end