FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / qual1.C
blob13f9bbe497a2ff5806d79eea4508efb6fab78415
1 // Build don't link:
2 // Origin: Benjamin Pflugmann <philemon@spin.de>
3 // Special g++ Options: -O
5 // DR 295 allows qualification via typedef
7 typedef const char *(func_type)();
9 class
11 public:
12   func_type *Function;
13   // The following is DR 295 dependent
14   const func_type* function(void) { return Function; } // ERROR - constifying
15   volatile func_type* functionv(void); // ERROR - qualifier
16 } action;
18 void work(const char *source)
20   work( action.function()() );