| 1 |
/* Do not warn about "slightly" mismatched method signatures if |
| 2 |
-Wstrict-selector-match is off. */ |
| 3 |
|
| 4 |
/* { dg-do compile } */ |
| 5 |
/* { dg-options "-Wno-strict-selector-match" } */ |
| 6 |
// { dg-additional-options "-Wno-objc-root-class" } |
| 7 |
|
| 8 |
#include <objc/objc.h> |
| 9 |
|
| 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; |
| 14 |
|
| 15 |
@interface Base |
| 16 |
- (id) meth1: (En1)arg1; |
| 17 |
- (St1) window; |
| 18 |
@end |
| 19 |
|
| 20 |
@interface Derived: Base |
| 21 |
- (id) meth1: (En2)arg1; |
| 22 |
- (St2)window; |
| 23 |
@end |
| 24 |
|
| 25 |
void foo(void) { |
| 26 |
id r; |
| 27 |
En1 en; |
| 28 |
|
| 29 |
[r meth1:en]; |
| 30 |
[r window]; |
| 31 |
} |