annotate gcc/testsuite/gcc.dg/c99-bool-2.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Test for _Bool bit-fields. After TC2, the width of a _Bool
kono
parents:
diff changeset
2 bit-field must not extend the width (number of sign and value bits)
kono
parents:
diff changeset
3 of _Bool, which is implementation-defined but is 1 unless the
kono
parents:
diff changeset
4 implementation defines representations for values greater than 1 in
kono
parents:
diff changeset
5 type _Bool and allows for _Bool objects to have such types, which
kono
parents:
diff changeset
6 GCC does not. */
kono
parents:
diff changeset
7 /* Origin: Joseph Myers <joseph@codesourcery.com> */
kono
parents:
diff changeset
8 /* { dg-do compile } */
kono
parents:
diff changeset
9 /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 struct foo
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 _Bool b : 2; /* { dg-error "width" } */
kono
parents:
diff changeset
14 };