view 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
line wrap: on
line source

// PR c++/78890
// { dg-do compile { target c++11 } }

union Test1 {
  static int kConstant;
};

union Test2 {
  static const int kConstant;
};

const int Test2::kConstant = 10;

int k;

union Test3 {
  static int& kRef;
};

int& Test3::kRef = k;

union Test4 {
  static const int& kRef;
};

const int& Test4::kRef = 10;