view gcc/testsuite/g++.dg/expr/bitfield12.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/19618

struct bset1 {
  bool bit : sizeof(bool) * __CHAR_BIT__ + 1;  // { dg-warning "exceeds" }
};

enum E {};

struct bset2 {
  E bit : sizeof(E) * __CHAR_BIT__ + 1;        // { dg-warning "exceeds" }
};

struct bset3 {
  bool bit : sizeof(bool) * __CHAR_BIT__;
};

struct bset4 {
  E bit : sizeof(E) * __CHAR_BIT__;
};