Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/obj-c++.dg/comp-types-13.mm @ 144:8f4e72ab4e11
fix segmentation fault caused by nothing next cur_op to end
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 23 Dec 2018 21:23:56 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* When assigning function pointers, allow for covariant return types and contravariant argument types. */ /* { dg-do compile } */ #include "../objc-obj-c++-shared/TestsuiteObject.h" @class Derived; TestsuiteObject *ExternFunc (TestsuiteObject *filePath, TestsuiteObject *key); typedef id FuncSignature (TestsuiteObject *arg1, Derived *arg2); @interface Derived: TestsuiteObject + (void)registerFunc:(FuncSignature *)function; @end void foo(void) { [Derived registerFunc: ExternFunc]; }