Index: libcxx/include/__config =================================================================== --- libcxx/include/__config +++ libcxx/include/__config @@ -92,7 +92,8 @@ // instead of as a class simulating an enum. If this option is enabled // `pointer_safety` and `get_pointer_safety()` will no longer be available // in C++03. -# define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE +// The underlying type of the typed enumeration is "unsigned char". +# define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE unsigned char // Define a key function for `bad_function_call` in the library, to centralize // its vtable and typeinfo to libc++ rather than having all other libraries // using that class define their own copies. @@ -127,6 +128,12 @@ # if defined(__FreeBSD__) # define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR # endif + +# if defined(_AIX) +// AIX used C++11 strongly typed enumeration with underlying type as "int" +// for `pointer_safety`. +# define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE int +# endif #endif #if defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2 Index: libcxx/include/memory =================================================================== --- libcxx/include/memory +++ libcxx/include/memory @@ -4076,7 +4076,7 @@ //enum class #if defined(_LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE) # ifndef _LIBCPP_CXX03_LANG -enum class pointer_safety : unsigned char { +enum class pointer_safety : _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE { relaxed, preferred, strict