]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.old-deja/g++.brendan/union1.C
Handle anonymous unions at the tree level.
[gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / union1.C
1 // GROUPS passed unions
2 // This is fixed by finish_anon_union doing a string_cst_equal check on
3 // the DECL_SIZE of the decls, instead of comparing the DECL_SIZE nodes.
4
5 // The compiler currently fails to allocate space for the static union.
6
7 unsigned
8 hash(const double d)
9 {
10 static union {
11 unsigned asint[2];
12 double asdouble;
13 };
14 asdouble = d;
15 return asint[0] ^ asint[1];
16 }
17
18 int main ()
19 {
20 hash (3.1415);
21 }
This page took 0.037059 seconds and 5 git commands to generate.