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