Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/union8.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 // PR c++/78890 |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 union Test1 { | |
5 static int kConstant; | |
6 }; | |
7 | |
8 union Test2 { | |
9 static const int kConstant; | |
10 }; | |
11 | |
12 const int Test2::kConstant = 10; | |
13 | |
14 int k; | |
15 | |
16 union Test3 { | |
17 static int& kRef; | |
18 }; | |
19 | |
20 int& Test3::kRef = k; | |
21 | |
22 union Test4 { | |
23 static const int& kRef; | |
24 }; | |
25 | |
26 const int& Test4::kRef = 10; |