1 // RUN: %clang_cc1 -x c %s -fsyntax-only -Wcast-function-type -triple x86_64-- -verify
5 typedef int (f1
)(long);
6 typedef int (f2
)(void*);
9 typedef void (f5
)(void);
10 typedef int (f6
)(long, int);
11 typedef int (f7
)(long,...);
23 b
= (f2
*)x
; /* expected-warning {{cast from 'int (*)(long)' to 'f2 *' (aka 'int (*)(void *)') converts to incompatible function type}} */
25 d
= (f4
*)x
; /* expected-warning {{cast from 'int (*)(long)' to 'f4 *' (aka 'void (*)()') converts to incompatible function type}} */
27 f
= (f6
*)x
; /* expected-warning {{cast from 'int (*)(long)' to 'f6 *' (aka 'int (*)(long, int)') converts to incompatible function type}} */