blob: 9cdf5a1e6a4a5606611a4245062acc0bd6c0c2c0 [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 -pedantic %s
Douglas Gregor08d918a2008-10-24 15:36:09 +00002
3void fnptrs()
4{
5 typedef void (*fnptr)();
6 fnptr fp = 0;
Richard Trieu553b2b22011-12-15 00:38:15 +00007 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}}
Douglas Gregor08d918a2008-10-24 15:36:09 +00009}