2010-01-01 05:34:51 -05:00
|
|
|
// RUN: %clang_cc1 %s -verify -pedantic
|
2009-06-02 13:58:47 -04:00
|
|
|
typedef int unary_int_func(int arg);
|
|
|
|
|
unary_int_func *func;
|
|
|
|
|
|
|
|
|
|
unary_int_func *set_func(void *p) {
|
2010-05-04 12:12:48 -04:00
|
|
|
func = p; // expected-warning {{converts between void pointer and function pointer}}
|
|
|
|
|
p = func; // expected-warning {{converts between void pointer and function pointer}}
|
2009-06-02 13:58:47 -04:00
|
|
|
|
2010-05-04 12:12:48 -04:00
|
|
|
return p; // expected-warning {{converts between void pointer and function pointer}}
|
2009-06-02 13:58:47 -04:00
|
|
|
}
|
|
|
|
|
|