bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* alignasof tests: Fix GCC warning (regression 2023-01-15)
@ 2023-01-21  9:03 Bruno Haible
  2023-01-21  9:11 ` alignasof tests: Rename test file Bruno Haible
  0 siblings, 1 reply; 2+ messages in thread
From: Bruno Haible @ 2023-01-21  9:03 UTC (permalink / raw)
  To: bug-gnulib

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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-21  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-21  9:03 alignasof tests: Fix GCC warning (regression 2023-01-15) Bruno Haible
2023-01-21  9:11 ` alignasof tests: Rename test file Bruno Haible

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).