+2023-08-03 Bruno Haible <bruno@clisp.org>
+
+ alignasof, stdalign: Avoid some -Wundef warnings from config.h.
+ Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00012.html>.
+ * m4/stdalign.m4 (gl_ALIGNASOF): Test whether __cplusplus is defined
+ before evaluating it. Assume HAVE_STDALIGN_H, _GL_STDALIGN_NEEDS_STDDEF
+ are never defined to 0.
+
2023-07-31 Bruno Haible <bruno@clisp.org>
readutmp: Fix test failure on OpenBSD.
dnl The "zz" puts this toward config.h's end, to avoid potential
dnl collisions with other definitions.
AH_VERBATIM([zzalignas],
-[#if !defined HAVE_C_ALIGNASOF && __cplusplus < 201103 && !defined alignof
-# if HAVE_STDALIGN_H
+[#if !defined HAVE_C_ALIGNASOF \
+ && !(defined __cplusplus && 201103 <= __cplusplus) \
+ && !defined alignof
+# if defined HAVE_STDALIGN_H
# include <stdalign.h>
# endif
# define _Alignas(a) __declspec (align (a))
# endif
# endif
-# if !HAVE_STDALIGN_H
+# if !defined HAVE_STDALIGN_H
# if ((defined _Alignas \
&& !(defined __cplusplus \
&& (201103 <= __cplusplus || defined _MSC_VER))) \
# endif
# endif
-# if _GL_STDALIGN_NEEDS_STDDEF
+# if defined _GL_STDALIGN_NEEDS_STDDEF
# include <stddef.h>
# endif
#endif])