From 48b4ba967a3c04c7dd263e775e0cbbb03ed58e8f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 20 May 2022 06:38:44 -0700 Subject: 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. --- ffi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ffi.c') 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; } -- cgit v1.2.3