Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/precedence.C

raw
1 // { dg-do assemble }
2 // Bug: g++ groups ->* before casts.
3 // PRMS Id: 4484 (bug 4)
4
5 struct A { };
6 struct B : public A { void f (); };
7
8 void g ()
9 {
10 A* ap = new B;
11 void (B::*p)() = &B::f;
12
13 ((B*)ap->*p)(); // { dg-bogus "" } incorrect precedence
14 }