modula2: Tidyup gm2-compiler/M2MetaError.mod
[official-gcc.git] / gcc / testsuite / obj-c++.dg / method-3.mm
blob17b0c99fb9605a541afcb12872939842d2a185fb
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 @interface Base
11 - (id) meth1: (Base *)arg1;
12 - (id) window;
13 @end
15 @interface Derived: Base
16 - (id) meth1: (Derived *)arg1;
17 - (Base *) window;
18 @end
20 void foo(void) {
21   id r;
23   [r meth1:r];
24   [r window];