1 // { dg-do assemble  }
2 // Origin: Mark Mitchell <mark@codesourcery.com>
3 
4 struct A {
5 };
6 
main()7 int main()
8 {
9   A a;
10   typedef void (A::*F)();
11   F p;
12 
13   const_cast<const A>(a); // { dg-error "" } const_cast requires pointer/ref types
14   const_cast<F>(p); // { dg-error "" } const_cast requires pointer/ref types
15   const_cast<int (*)()>(&main); // { dg-error "" } function type in const_cast
16   const_cast<int (&)()>(main); // { dg-error "" } function type in const_cast
17 }
18