URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
703 |
jeremybenn |
/* Check if finding multiple signatures for a method is handled gracefully. Author: Ziemowit Laski */
|
2 |
|
|
/* { dg-options "-Wstrict-selector-match" } */
|
3 |
|
|
/* { dg-do compile } */
|
4 |
|
|
#include
|
5 |
|
|
#include "../objc-obj-c++-shared/TestsuiteObject.h"
|
6 |
|
|
|
7 |
|
|
@interface Class1
|
8 |
|
|
- (void)setWindow:(TestsuiteObject *)wdw;
|
9 |
|
|
@end
|
10 |
|
|
|
11 |
|
|
@interface Class2
|
12 |
|
|
- (void)setWindow:(Class1 *)window;
|
13 |
|
|
@end
|
14 |
|
|
|
15 |
|
|
id foo(void) {
|
16 |
|
|
TestsuiteObject *obj = [[TestsuiteObject alloc] init];
|
17 |
|
|
id obj2 = obj;
|
18 |
|
|
[obj setWindow:nil]; /* { dg-warning ".TestsuiteObject. may not respond to .\\-setWindow:." } */
|
19 |
|
|
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 18 } */
|
20 |
|
|
/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 18 } */
|
21 |
|
|
/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 18 } */
|
22 |
|
|
[obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
|
23 |
|
|
/* { dg-message "using .\\-\\(void\\)setWindow:\\(TestsuiteObject \\*\\)wdw." "" { target *-*-* } 8 } */
|
24 |
|
|
/* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 12 } */
|
25 |
|
|
|
26 |
|
|
return obj;
|
27 |
|
|
}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.