PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / objc.dg / comp-types-12.m
blob5e32cfe92338539d40e8d1d81a2daada23a695cb
1 /* When assigning function pointers, allow for covariant return types
2    and contravariant argument types.  */
3 /* { dg-do compile } */
4 #include "../objc-obj-c++-shared/TestsuiteObject.h"
6 @class Derived;
8 TestsuiteObject *ExternFunc (TestsuiteObject *filePath, TestsuiteObject *key);
9 typedef id FuncSignature (TestsuiteObject *arg1, Derived *arg2);
11 @interface Derived: TestsuiteObject
12 + (void)registerFunc:(FuncSignature *)function;
13 @end
15 void foo(void)
17   [Derived registerFunc: ExternFunc];