comparison clang/test/Sema/function-ptr.c @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
1 // RUN: %clang_cc1 %s -verify -pedantic
2 typedef int unary_int_func(int arg);
3 unary_int_func *func;
4
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