Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / objc.dg / enhanced-proto-2.m
blobca99445df409f220eb4c661a57c564eb1e0b8839
1 /* Test use of @optional/@required keywords in @protocol class. */
2 /* { dg-do compile } */
3 /* { dg-additional-options "-Wno-objc-root-class" } */
5 @protocol MyProto1 
6 @optional
7 - (void) FOO;
8 @optional
9 - (void) FOO;
10 @optional 
11 - (void) REQ;
12 @optional
13 @end
15 @interface  MyProto2 <MyProto1>
16 @required               /* { dg-error ".@required. is allowed in @protocol context only" }  */
17 - (void) FOO2;
18 @optional               /* { dg-error ".@optional. is allowed in @protocol context only" }  */
19 - (void) FOO3;
20 @end
22 @implementation MyProto2
23 - (void) FOO2{}
24 - (void) FOO3{}
25 @end