* 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
* alignasof tests: Rename test file
2023-01-21 9:03 alignasof tests: Fix GCC warning (regression 2023-01-15) Bruno Haible
@ 2023-01-21 9:11 ` Bruno Haible
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Haible @ 2023-01-21 9:11 UTC (permalink / raw)
To: bug-gnulib
> alignasof tests: Fix GCC warning (regression 2023-01-15).
> * tests/test-stdalign.c (alignas): Undefine before redefine.
The common file naming pattern is broken after the refactoring from 2023-01-15.
test-stdalign.c is no longer testing <stdalign.h> (since it does not even
include <stdalign.h> any more).
This patch corrects it.
2023-01-21 Bruno Haible <bruno@clisp.org>
alignasof tests: Rename test file.
* tests/test-alignasof.c: Renamed from tests/test-stdalign.c.
* modules/alignasof-tests (Files, Makefile.am): Update accordingly.
diff --git a/modules/alignasof-tests b/modules/alignasof-tests
index 95602c2fef..35bef17b99 100644
--- a/modules/alignasof-tests
+++ b/modules/alignasof-tests
@@ -1,5 +1,5 @@
Files:
-tests/test-stdalign.c
+tests/test-alignasof.c
tests/macros.h
Depends-on:
@@ -9,5 +9,5 @@ stdint
configure.ac:
Makefile.am:
-TESTS += test-stdalign
-check_PROGRAMS += test-stdalign
+TESTS += test-alignasof
+check_PROGRAMS += test-alignasof
diff --git a/tests/test-alignasof.c b/tests/test-alignasof.c
index 85008e62e4..18c0d48866 100644
--- a/tests/test-alignasof.c
+++ b/tests/test-alignasof.c
@@ -1,4 +1,4 @@
-/* Test of <stdalign.h>.
+/* Test of alignasof module.
Copyright 2009-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
^ 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
Code repositories for project(s) associated with this public inbox
https://public-inbox.org/mirrors/gnulib.git/
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).