bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: alignasof tests: Fix GCC warning (regression 2023-01-15)
Date: Sat, 21 Jan 2023 10:03:22 +0100	[thread overview]
Message-ID: <11682731.WDq5lpvYvz@nimes> (raw)

On platforms with GCC 5.5.0 or 11.3.0, I see this compilation warning:

../../gltests/test-stdalign.c:38:0: warning: "alignas" redefined

This patch fixes it.


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

	alignasof tests: Fix GCC warning (regression 2023-01-15).
	* tests/test-stdalign.c (alignas): Undefine before redefine.

diff --git a/tests/test-stdalign.c b/tests/test-stdalign.c
index c974ca8371..85008e62e4 100644
--- a/tests/test-stdalign.c
+++ b/tests/test-stdalign.c
@@ -35,6 +35,7 @@ typedef struct { char a[4]; } struct4;
    limit the test to 8 for now.  */
 # define TEST_ALIGNMENT 8
 #else
+# undef alignas
 # define alignas(alignment)
 # define TEST_ALIGNMENT 1
 #endif





             reply	other threads:[~2023-01-21  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21  9:03 Bruno Haible [this message]
2023-01-21  9:11 ` alignasof tests: Rename test file Bruno Haible

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=11682731.WDq5lpvYvz@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /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).