From: Paul Eggert Date: Tue, 13 Sep 2022 17:41:34 +0000 (-0500) Subject: Port alignas definition to C23 X-Git-Tag: emacs-29.0.90~1856^2~540 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=49419912f20b3cf0131a40798b162cbb596d368e;p=emacs.git Port alignas definition to C23 * src/lisp.h (alignas): C23 is removing the __alignas_is_defined macro, so do not rely on it. Instead, do not define alignas if C23 or later, or if C++11 or later. --- diff --git a/src/lisp.h b/src/lisp.h index 2f73ba4c617..9710dbef8d2 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -245,7 +245,8 @@ DEFINE_GDB_SYMBOL_BEGIN (EMACS_INT, VALMASK) DEFINE_GDB_SYMBOL_END (VALMASK) /* Ignore 'alignas' on compilers lacking it. */ -#if !defined alignas && !defined __alignas_is_defined +#if (!defined alignas && !defined __alignas_is_defined \ + && __STDC_VERSION__ < 202311 && __cplusplus < 201103) # define alignas(a) #endif