| 1 |
// { dg-do assemble } |
| 2 |
// Submitted by Nathan Sidwell <[email protected]> |
| 3 |
// Bug: g++ was crashing after giving errors. |
| 4 |
|
| 5 |
template<class T> |
| 6 |
void connect_to_method( |
| 7 |
T *receiver, |
| 8 |
void (T::*method)()) |
| 9 |
{} |
| 10 |
|
| 11 |
class Gtk_Base |
| 12 |
{ |
| 13 |
public: |
| 14 |
void expose(); |
| 15 |
void show(); |
| 16 |
void show(int); |
| 17 |
Gtk_Base(); |
| 18 |
}; |
| 19 |
|
| 20 |
|
| 21 |
Gtk_Base::Gtk_Base() |
| 22 |
{ |
| 23 |
connect_to_method(this,&show); // { dg-error "pointer to member" } invalid pmf expression |
| 24 |
connect_to_method(this,&expose); // { dg-error "pointer to member" } invalid pmf expression |
| 25 |
} |