Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/union8.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
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; |