xref: /aosp_15_r20/external/clang/test/Sema/function-ptr.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1 // RUN: %clang_cc1 %s -verify -pedantic
2 typedef int unary_int_func(int arg);
3 unary_int_func *func;
4 
set_func(void * p)5 unary_int_func *set_func(void *p) {
6  func = p; // expected-warning {{converts between void pointer and function pointer}}
7  p = func; // expected-warning {{converts between void pointer and function pointer}}
8 
9  return p; // expected-warning {{converts between void pointer and function pointer}}
10 }
11 
12