c++: normalizing ttp constraints [PR115656]
[official-gcc.git] / gcc / testsuite / obj-c++.dg / method-5.mm
blob10364cc38093b219fd1119698ba15c3d1db4307e
1 /* Do not warn about "slightly" mismatched method signatures if 
2    -Wstrict-selector-match is off.  */
4 /* { dg-do compile } */
5 /* { dg-options "-Wno-strict-selector-match" } */
6 // { dg-additional-options "-Wno-objc-root-class" }
8 #include <objc/objc.h>
10 typedef enum { en1_1, en1_2 } En1;
11 typedef enum { en2_1, en2_2 } En2;
12 typedef struct { int a, b; } St1;
13 typedef struct { unsigned a, b; } St2;
15 @interface Base
16 - (id) meth1: (En1)arg1;
17 - (St1) window;
18 @end
20 @interface Derived: Base
21 - (id) meth1: (En2)arg1;
22 - (St2)window;
23 @end
25 void foo(void) {
26   id r;
27   En1 en;
29   [r meth1:en];
30   [r window];