@@ -1,4 +1,4 @@
-/* $NetBSD: msg_035.c,v 1.3 2021/01/02 16:12:39 rillig Exp $ */
+/* $NetBSD: msg_035.c,v 1.4 2021/01/02 16:33:39 rillig Exp $ */
# 3 "msg_035.c"
// Test for message: illegal bit-field type [35]
@@ -30,7 +30,7 @@
struct example {
signed signed_flag: 1;
unsigned unsigned_flag: 1;
- _Bool boolean_flag: 1; // FIXME: allowed since C99 6.7.2.1p5
+ _Bool boolean_flag: 1;
char char_flag: 1;
signed char signed_char_flag: 1;
unsigned char unsigned_char_flag: 1;
@@ -1,4 +1,3 @@
-msg_035.c(33): warning: illegal bit-field type [35]
msg_035.c(41): warning: illegal bit-field type [35]
msg_035.c(42): warning: illegal bit-field type [35]
msg_035.c(43): warning: illegal bit-field type [35]
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.98 2021/01/02 03:49:25 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.99 2021/01/02 16:33:39 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.98 2021/01/02 03:49:25 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.99 2021/01/02 16:33:39 rillig Exp $");
#endif
#include <sys/param.h>
@@ -1118,7 +1118,7 @@
/* nonportable bit-field type */
warning(34);
}
- } else if (t != INT && t != UINT) {
+ } else if (t != INT && t != UINT && t != BOOL) {
/*
* Non-integer types are always illegal for
* bitfields, regardless of BITFIELDTYPE.