https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104395
Bug ID: 104395 Summary: alignof is a C++11 feature. src/c++98/bitmap_allocator.cc??? Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: unlvsur at live dot com Target Milestone: --- https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/src/c%2B%2B98/bitmap_allocator.cc https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/ext/bitmap_allocator.h clang provides the option -faligned-allocation. It would define that macro even in C++98 mode. Probably we need to detect whether __cplusplus >= 201103L? /home/cqwrteur/myhome/gcc_build/native/wasm32-wasi/libstdc++-v3/include/ext/bitmap_allocator.h:1047:18: error: unexpected type name 'value_type': expected expression if (alignof(value_type) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) ^