[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / reinterpret-fn-obj-pedantic.cpp
blob9cdf5a1e6a4a5606611a4245062acc0bd6c0c2c0
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 -pedantic %s
3 void fnptrs()
5 typedef void (*fnptr)();
6 fnptr fp = 0;
7 void *vp = reinterpret_cast<void*>(fp); // expected-warning {{cast between pointer-to-function and pointer-to-object is an extension}}
8 (void)reinterpret_cast<fnptr>(vp); // expected-warning {{cast between pointer-to-function and pointer-to-object is an extension}}