3 // Copyright (C) 2004 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 20 Oct 2004 <nathan@codesourcery.com>
6 // DR 195 will allow conversions between function and object pointers
7 // under some circumstances. It is in drafting, so we don't implement
10 // this checks we are silent when not being pedantic.
12 typedef void (*PF)(void);
23 /* the following two will almost definitly be ok with 195. */
24 pf = reinterpret_cast <PF>(pv);
25 pv = reinterpret_cast <PV>(pf);
27 /* the following two might or might not be ok with 195. */
28 pf = reinterpret_cast <PF>(po);
29 po = reinterpret_cast <PO>(pf);
31 /* These will never be ok, as they are implicit. */
32 pv = pf; // { dg-error "invalid conversion" "" }
33 pf = pv; // { dg-error "invalid conversion" "" }