aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/pmf3.C
blob: 448d7914571aa38f92b2f53ea200bb4242cfd52b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// { dg-do assemble  }
// Submitted by Nathan Sidwell <nathan@acm.org>
// Bug: g++ was crashing after giving errors.

template<class T>
  void connect_to_method(
    T *receiver,
    void (T::*method)())
  {}

class Gtk_Base
{
public:
  void expose();
  void show();
  void show(int);
  Gtk_Base();
};


Gtk_Base::Gtk_Base()
{
  connect_to_method(this,&show);   // { dg-error "pointer to member" } invalid pmf expression
  connect_to_method(this,&expose); // { dg-error "pointer to member" } invalid pmf expression
}