aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tccgen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tccgen.c b/tccgen.c
index c37e27b..c823d42 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -3795,6 +3795,8 @@ ST_FUNC void unary(void)
if (!(type.t & VT_VLA)) {
if (size < 0)
tcc_error("sizeof applied to an incomplete type");
+ if(type.t & VT_BITFIELD)
+ tcc_error("'%s' applied to a bit-field", get_tok_str(t, NULL));
vpushs(size);
} else {
vla_runtime_type_size(&type, &align);