On 1/18/23 03:32, Khem Raj wrote: > WG14 N2350 made very clear that it is an UB having type definitions > within "offsetof" [1]. This patch enhances the implementation of macro > alignof_slot to use builtin "_Alignof" to avoid undefined behavior on > when using std=c11 or newer > > clang 16+ has started to flag this [2] > > Fixes build when using -std >= gnu11 and using clang16+ > > Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it > may support C11, exclude those compilers too > > [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm > [2] https://reviews.llvm.org/D133574 > > Upstream-Status: Pending > Signed-off-by: Khem Raj <raj.khem@xxxxxxxxx> > --- > sha1.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) Applied, Thanks, Jes