blob: 16b8659711e2a2b03b6853b364919b95e2d6dc35 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -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;
7 void *vp = reinterpret_cast<void*>(fp); // expected-warning {{reinterpret_cast between pointer-to-function and pointer-to-object is an extension}}
8 (void)reinterpret_cast<fnptr>(vp); // expected-warning {{reinterpret_cast between pointer-to-function and pointer-to-object is an extension}}
9}