2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / pmf3.C
blob695a1c584aba6e87c31a1fbeac24ce755e491f6b
1 // { dg-do assemble  }
2 // Submitted by Nathan Sidwell <nathan@acm.org>
3 // Bug: g++ was crashing after giving errors.
5 template<class T>
6   void connect_to_method(
7     T *receiver,
8     void (T::*method)())
9   {}
11 class Gtk_Base
12
13 public:
14   void expose();
15   void show();
16   void show(int);
17   Gtk_Base();
21 Gtk_Base::Gtk_Base()
23   connect_to_method(this,&show);   // { dg-error "" } invalid pmf expression
24   connect_to_method(this,&expose); // { dg-error "" } invalid pmf expression