aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/precedence.C
blob: af2dcde85a5a465795978c6df20224a9580411a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Bug: g++ groups ->* before casts.
// PRMS Id: 4484 (bug 4)
// Build don't link:

struct A { };
struct B : public A { void f (); };

void g ()
{
  A* ap = new B;
  void (B::*p)() = &B::f;

  ((B*)ap->*p)();		// gets bogus error - incorrect precedence
}