OSDN Git Service

PR testsuite/25241
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / pmf3.C
1 // { dg-do assemble  }
2 // Submitted by Nathan Sidwell <nathan@acm.org>
3 // Bug: g++ was crashing after giving errors.
4
5 template<class T>
6   void connect_to_method( // { dg-message "candidates are" }
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 "no match" } invalid pmf expression
24   connect_to_method(this,&expose); // { dg-error "pointer to member" } invalid pmf expression
25 }