3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 3 Jan 2000 <nathan@acm.org>
6 // Derived from a bug report by Ulrich Drepper <drepper@cygnus.com>
8 struct A {operator char * () { return 0;} };
9 struct B {operator char * () const { return 0;} };
10 struct C {operator char const * () { return 0;} };
11 struct D {operator char const * () const { return 0;} };
20 static_cast <char *> (a);
21 static_cast <char *> (b);
22 static_cast <char *> (c); // ERROR - static cast
23 static_cast <char *> (d); // ERROR - static cast
33 static_cast <const char *> (a);
34 static_cast <const char *> (b);
35 static_cast <const char *> (c);
36 static_cast <const char *> (d);
46 static_cast <char *> (a); // ERROR - static cast
47 static_cast <char *> (b);
48 static_cast <char *> (c); // ERROR - static cast
49 static_cast <char *> (d); // ERROR - static cast
59 static_cast <const char *> (a); // ERROR - static cast
60 static_cast <const char *> (b);
61 static_cast <const char *> (c); // ERROR - static cast
62 static_cast <const char *> (d);