You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on updating the rust-bindgen package in debian sid, I ran into a bindgen layout error with leptonica-sys. After some experimentation this failure seems to be caused by building bindings for stddef.h.
I wrote a small c test program to see what size the c compilers thought max_align_t should have, worryingly gcc and clang gave different results with gcc giving a result of 48 and clang a result of only 24.
max_align_t does not seem to be defined in any system headers, so I presume there is some built-in magic going on in gcc and clang.
The text was updated successfully, but these errors were encountered:
max_align_t comes from /usr/lib/clang/18/include/__stddef_max_align_t.h on my system:
/*===---- __stddef_max_align_t.h - Definition of max_align_t ---------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */#ifndef__CLANG_MAX_ALIGN_T_DEFINED#define__CLANG_MAX_ALIGN_T_DEFINED#if defined(_MSC_VER)
typedefdoublemax_align_t;
#elif defined(__APPLE__)
typedeflong doublemax_align_t;
#else// Define 'max_align_t' to match the GCC definition.typedefstruct {
long long__clang_max_align_nonce1
__attribute__((__aligned__(__alignof__(long long))));
long double__clang_max_align_nonce2
__attribute__((__aligned__(__alignof__(long double))));
} max_align_t;
#endif#endif
so it seems clang is trying to match gcc's definition of it. In either case, I think part of the issue here is that long double is not being translated properly by bindgen or something. So definitely a bug in our side.
While working on updating the rust-bindgen package in debian sid, I ran into a bindgen layout error with leptonica-sys. After some experimentation this failure seems to be caused by building bindings for stddef.h.
As a reduced testcase the following commands
resulted in
I wrote a small c test program to see what size the c compilers thought max_align_t should have, worryingly gcc and clang gave different results with gcc giving a result of 48 and clang a result of only 24.
max_align_t does not seem to be defined in any system headers, so I presume there is some built-in magic going on in gcc and clang.
The text was updated successfully, but these errors were encountered: