mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 06:18:56 -04:00

someone thought all the bits would be value bits in this case. Also fix the wording of the warning -- it claimed that the width of 'bool' is 8, which is not correct; the width is 1 bit, whereas the size is 8 bits in our implementation. llvm-svn: 248435
11 lines
501 B
C++
11 lines
501 B
C++
// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -mms-bitfields -verify %s 2>&1
|
|
|
|
struct A {
|
|
char a : 9; // expected-error{{width of bit-field 'a' (9 bits) exceeds size of its type (8 bits)}}
|
|
int b : 33; // expected-error{{width of bit-field 'b' (33 bits) exceeds size of its type (32 bits)}}
|
|
bool c : 9; // expected-error{{width of bit-field 'c' (9 bits) exceeds size of its type (8 bits)}}
|
|
bool d : 3;
|
|
};
|
|
|
|
int a[sizeof(A) == 1 ? 1 : -1];
|