summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-20 06:38:44 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-20 06:38:44 -0700
commit48b4ba967a3c04c7dd263e775e0cbbb03ed58e8f (patch)
tree678a01888e57184e4419d18ca2995bf2bf5972f5 /ffi.c
parent1c70056c20ad0001b45daa7289c01d0eb3577211 (diff)
downloadtxr-48b4ba967a3c04c7dd263e775e0cbbb03ed58e8f.tar.gz
txr-48b4ba967a3c04c7dd263e775e0cbbb03ed58e8f.tar.bz2
txr-48b4ba967a3c04c7dd263e775e0cbbb03ed58e8f.zip
ffi: behavior of align subject to compat.
* ffi.c (ffi_type_compile): Allow align to weaken (lower) alignment if compatibility 275 or lower is requested. * txr.1: Compat note added.
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffi.c b/ffi.c
index e0276ec7..8f482e9a 100644
--- a/ffi.c
+++ b/ffi.c
@@ -4358,7 +4358,8 @@ val ffi_type_compile(val syntax)
} else {
val altype_copy = ffi_type_copy(altype);
struct txr_ffi_type *atft = ffi_type_struct(altype_copy);
- if (al > atft->align || sym == pack_s)
+ if (al > atft->align || sym == pack_s ||
+ (opt_compat && opt_compat <= 275))
atft->align = al;
return altype_copy;
}