bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org, Paul Eggert <eggert@cs.ucla.edu>
Cc: Khem Raj <raj.khem@gmail.com>
Subject: Re: [PATCH v2] Define alignof_slot using _Alignof when using C11 or newer
Date: Mon, 16 Jan 2023 18:01:22 +0100	[thread overview]
Message-ID: <3174038.jMmpn3RHMN@nimes> (raw)
In-Reply-To: <6427f898-83b5-abe2-afd3-a4dc9ecb7a09@cs.ucla.edu>

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..  -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1 -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';





      parent reply	other threads:[~2023-01-16 17:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15  1:20 [PATCH v2] Define alignof_slot using _Alignof when using C11 or newer Khem Raj
2023-01-15  1:51 ` Paul Eggert
2023-01-15 19:52   ` Paul Eggert
2023-01-15 19:56     ` Paul Eggert
2023-01-15 23:05     ` Khem Raj
2023-01-16 17:01     ` Bruno Haible [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3174038.jMmpn3RHMN@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).