2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.benjamin / 16567.C
blob7b4f68bbe501d40c5a1c2763eb7d16a8643f3015
1 // { dg-do assemble  }
2 // 981203 bkoz
3 // g++/16567
5 typedef bool Bool;
6 typedef unsigned char           Uint8;
7 typedef unsigned short          Uint16;
8 typedef unsigned int            Uint32;
10 enum e_ms  { third = 3, fourth = 4 };
12 struct bitmask {
13   Uint8* anon1;          
14   Uint32 anon2;
15   Uint8 anon3;
16   Uint8 here: 2;
17   Uint8 anon4: 2;
18   Uint8 anon5: 4;
21 struct control {
22   Uint8 foo_1();
25 inline Uint8 foo_2(bitmask* p) {
26    return p->here;
29 inline Uint8 control::foo_1() {
30    return foo_2((bitmask*) this);
33 void foo(void) {
34   control obj;
35   control *fp = &obj;
36   e_ms result;
37   
38   result = (e_ms) fp->foo_1; // { dg-error "" } // ERROR -
40