diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -1436,14 +1436,6 @@ # define _LIBCPP_GCC_DIAGNOSTIC_IGNORED(str) #endif -#if defined(_AIX) && !defined(_LIBCPP_COMPILER_GCC) -# define _LIBCPP_PACKED_BYTE_FOR_AIX _Pragma("pack(1)") -# define _LIBCPP_PACKED_BYTE_FOR_AIX_END _Pragma("pack(pop)") -#else -# define _LIBCPP_PACKED_BYTE_FOR_AIX /* empty */ -# define _LIBCPP_PACKED_BYTE_FOR_AIX_END /* empty */ -#endif - #endif // __cplusplus #endif // _LIBCPP_CONFIG diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h --- a/libcxx/include/__format/parser_std_format_spec.h +++ b/libcxx/include/__format/parser_std_format_spec.h @@ -52,8 +52,12 @@ * * The format-type filtering needs to be done post parsing in the parser * derived from @ref __parser_std. */ -_LIBCPP_PACKED_BYTE_FOR_AIX -class _LIBCPP_TYPE_VIS _Flags { +#if defined(_AIX) +class _LIBCPP_TYPE_VIS __attribute__((__packed__)) _Flags +#else +class _LIBCPP_TYPE_VIS _Flags +#endif +{ public: enum class _LIBCPP_ENUM_VIS _Alignment : uint8_t { /** @@ -110,7 +114,6 @@ _Type __type{_Type::__default}; }; -_LIBCPP_PACKED_BYTE_FOR_AIX_END namespace __detail { template