GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc/c++ Breaking Change

Alignof (decltype (^^::)) changed to alignof (void *).

Corrected alignment of `std::meta::info` type in C++ reflection.

The alignment of std::meta::info in C++ reflection has been corrected to match alignof(void*) instead of the previous incorrect value of 1. This change impacts the alignof(decltype(^^::)) expression, ensuring consistent ABI behavior for reflection metadata, particularly for C++26 experimental features.

In Details

The meta_info_type_node in reflect.cc previously had its TYPE_ALIGN unset, defaulting alignof to 1. This commit corrects this by initializing TYPE_ALIGN (along with TYPE_UNSIGNED, TYPE_PRECISION, and TYPE_MODE) to match void*'s alignment. This change is unconditional for C++26 experimental features, affecting the result of alignof(decltype(^^::)) and ensuring ABI compatibility.

For Context
alignof
A C++ keyword that returns the alignment requirement of a type or expression, indicating the memory address boundary on which an object of that type must be placed.
decltype
A C++ keyword that deduces the type of an expression.
C++26
The planned next major standard release of the C++ programming language, which may include experimental features.
ABI
Application Binary Interface. Defines how low-level code, such as compiled functions and libraries, interact with each other, including data layout and function calling conventions.
Filed Under: c++reflectionabialignment