[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] Define alignof_slot using _Alignof when using C11 or newe

From: Bruno Haible
Subject: Re: [PATCH v2] Define alignof_slot using _Alignof when using C11 or newer
Date: Mon, 16 Jan 2023 18:01:22 +0100

Paul Eggert wrote:
> The basic idea is to prefer C23 semantics in apps and the rest of Gnulib 
> by using the new alignasof module, whereas the existing stdalign module 
> is now for C11/C17 compatibility and is now deprecated.

On Android (and probably some other platforms) I now see a compilation error:

terminal-gcc -mandroid -D__ANDROID__ -std=gnu99 -DHAVE_CONFIG_H -I. 
-I../../gltests -I.. -I../../gltests/.. -I../gllib -I../../gltests/../gllib 
-I/data/data/com.spartacusrex.spartacuside/files/local/include -Wall  
-Wno-error -O2 -c -o test-stddef.o ../../gltests/test-stddef.c
../../gltests/test-stddef.c:23:22: error: stdalign.h: No such file or directory
make[4]: *** [test-stddef.o] Error 1

This patch fixes it. It could already have been done on 2022-09-13, but
is needed now that the 'alignasof' module is used instead of the old,
deprecated 'stdalign' module.

2023-01-16  Bruno Haible  <bruno@clisp.org>

        stddef tests: Fix compilation error (regression 2023-01-15).
        * tests/test-stddef.c: Don't include <stdalign.h>.

diff --git a/tests/test-stddef.c b/tests/test-stddef.c
index 25ad00e490..1d674b3cea 100644
--- a/tests/test-stddef.c
+++ b/tests/test-stddef.c
@@ -20,7 +20,6 @@
 #include <stddef.h>
 #include <limits.h>
-#include <stdalign.h>
 /* Check that appropriate types are defined.  */
 wchar_t a = 'c';

reply via email to

[Prev in Thread] Current Thread [Next in Thread]