1 // Copyright (C) 1999, 2000 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 21 Nov 1999 <nathan@acm.org>
4 // make sure __FUNCTION__ and __PRETTY_FUNCTION__ work in member functions
9 static bool bad = false;
21 char const *function = __FUNCTION__;
22 char const *pretty = __PRETTY_FUNCTION__;
25 printf ("__FUNCTION__ %s\n", function);
26 printf ("__PRETTY_FUNCTION__ %s\n", pretty);
28 if (strcmp (function, "X"))
30 if (strcmp (pretty, "X::X()"))
35 char const *function = __FUNCTION__;
36 char const *pretty = __PRETTY_FUNCTION__;
39 printf ("__FUNCTION__ %s\n", function);
40 printf ("__PRETTY_FUNCTION__ %s\n", pretty);
42 if (strcmp (function, "X"))
44 if (strcmp (pretty, "X::~X()"))
49 char const *function = __FUNCTION__;
50 char const *pretty = __PRETTY_FUNCTION__;
52 printf ("member fn\n");
53 printf ("__FUNCTION__ %s\n", function);
54 printf ("__PRETTY_FUNCTION__ %s\n", pretty);
56 if (strcmp (function, "fn"))
58 if (strcmp (pretty, "void X::fn()"))
63 char const *function = __FUNCTION__;
64 char const *pretty = __PRETTY_FUNCTION__;
66 printf ("conversion\n");
67 printf ("__FUNCTION__ %s\n", function);
68 printf ("__PRETTY_FUNCTION__ %s\n", pretty);
70 if (strcmp (function, "operator i"))
72 if (strcmp (pretty, "X::operator int()"))