summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-17 20:47:04 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-17 20:47:04 -0700
commit84f3ab45a75a881cf7959edd381bbcd0ee828ed5 (patch)
treebaf04ff35c3f79e6ab77dc9e7143f9d707bcdeea /ffi.c
parentfca75faa1a6c3737b038d5fee6ce714a1f554280 (diff)
downloadtxr-84f3ab45a75a881cf7959edd381bbcd0ee828ed5.tar.gz
txr-84f3ab45a75a881cf7959edd381bbcd0ee828ed5.tar.bz2
txr-84f3ab45a75a881cf7959edd381bbcd0ee828ed5.zip
ffi: bugfix: unions are not unconditionally incomplete.
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi.c b/ffi.c
index 636db408..a12ef4a3 100644
--- a/ffi.c
+++ b/ffi.c
@@ -3604,7 +3604,7 @@ static val make_ffi_type_union(val syntax, val use_existing, val self)
uw_throwf(error_s,
lit("~a: unions cannot contain incomplete member"),
self, nao);
-
+ tft->incomplete = (nmemb == 0);
tft->nelem = i;
tft->size = (biggest_size + most_align - 1) & ~(most_align - 1);