https://gcc.gnu.org/g:b651c9d3f37d989e4f381880238cc1a1b872e3f1
commit r17-4749-gb651c9d3f37d989e4f381880238cc1a1b872e3f1 Author: Jonathan Wakely <[email protected]> Date: Wed Sep 16 17:25:07 2026 +0100 ginclude: Add comments to <stdalign.h> and <stdbool.h> about deprecated macros The <stdalign.h> macros were removed from C23 and C++26 but this patch just tweaks the comment, without actually removing them. Doing so would technically be a breaking change, but it's not expected that these macros are widely used. gcc/ChangeLog: * ginclude/stdalign.h (__alignas_is_defined, __alignof_is_defined): Note that the macros were removed in C23 and C++26. * ginclude/stdbool.h (__bool_true_false_are_defined): Note that the macro is obsolescent since C23 and deprecated since C++23. Reviewed-by: Jason Merrill <[email protected]> Diff: --- gcc/ginclude/stdalign.h | 3 ++- gcc/ginclude/stdbool.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/ginclude/stdalign.h b/gcc/ginclude/stdalign.h index a68cb28059ce..fdf016ef3bfe 100644 --- a/gcc/ginclude/stdalign.h +++ b/gcc/ginclude/stdalign.h @@ -33,7 +33,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define alignof _Alignof #endif -/* These are defined for C++, but deprecated in C++23. */ +/* Added in C99, removed in C23. + Also defined in C++ since C++11, deprecated in C++23 and gone in C++26. */ #define __alignas_is_defined 1 #define __alignof_is_defined 1 diff --git a/gcc/ginclude/stdbool.h b/gcc/ginclude/stdbool.h index 9070a1876233..a45bd9b7712b 100644 --- a/gcc/ginclude/stdbool.h +++ b/gcc/ginclude/stdbool.h @@ -46,6 +46,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #endif /* __cplusplus */ /* Signal that all the definitions are present. */ +/* Added in C99, made obsolescent in C23. + Also defined in C++ since C++11, but deprecated in C++23. */ #define __bool_true_false_are_defined 1 #endif /* stdbool.h */
