Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.benjamin/18208.C

raw
1 // { dg-do assemble }
2 // 981204 bkoz
3 // g++/18208
4
5 typedef unsigned int uint_32;
6
7 class puertorico {
8 public:
9 void *f ();
10 private:
11 uint_32 member;
12 };
13
14 void foo( )
15 {
16 uint_32 ui;
17 puertorico obj;
18
19 // Bug using static_cast<>
20 ui = static_cast<uint_32>(obj); // { dg-error "" } // ERROR -
21
22 // Bug when missing the pair of braces
23 ui = (uint_32) obj.f; // { dg-error "" } // ERROR -
24 }
25