blob: ff852725baefb8c19b4ef89fccbfee0fca88f5e1 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -verify -pedantic
Chris Lattnerbfe639e2008-01-03 22:56:36 +00002typedef int unary_int_func(int arg);
3unary_int_func *func;
4
5unary_int_func *set_func(void *p) {
Douglas Gregord4eea832010-04-09 00:35:39 +00006 func = p; // expected-warning {{converts between void pointer and function pointer}}
7 p = func; // expected-warning {{converts between void pointer and function pointer}}
Chris Lattnerbfe639e2008-01-03 22:56:36 +00008
Douglas Gregord4eea832010-04-09 00:35:39 +00009 return p; // expected-warning {{converts between void pointer and function pointer}}
Chris Lattnerbfe639e2008-01-03 22:56:36 +000010}
11