2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -verify -pedantic
|
2008-01-04 06:56:36 +08:00
|
|
|
typedef int unary_int_func(int arg);
|
|
|
|
unary_int_func *func;
|
|
|
|
|
|
|
|
unary_int_func *set_func(void *p) {
|
2010-04-09 08:35:39 +08:00
|
|
|
func = p; // expected-warning {{converts between void pointer and function pointer}}
|
|
|
|
p = func; // expected-warning {{converts between void pointer and function pointer}}
|
2008-01-04 06:56:36 +08:00
|
|
|
|
2010-04-09 08:35:39 +08:00
|
|
|
return p; // expected-warning {{converts between void pointer and function pointer}}
|
2008-01-04 06:56:36 +08:00
|
|
|
}
|
|
|
|
|