[libcxx-commits] [libcxx] 4f57a12 - [libc++] Remove definition of _LIBCPP_ALIGNOF for GCC in C++03 mode

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 2 09:31:41 PDT 2020


Author: Louis Dionne
Date: 2020-09-02T12:29:42-04:00
New Revision: 4f57a126c4e763e3041c04f0b22e91200506dcc6

URL: https://github.com/llvm/llvm-project/commit/4f57a126c4e763e3041c04f0b22e91200506dcc6
DIFF: https://github.com/llvm/llvm-project/commit/4f57a126c4e763e3041c04f0b22e91200506dcc6.diff

LOG: [libc++] Remove definition of _LIBCPP_ALIGNOF for GCC in C++03 mode

That definition is known to be potentially incorrect, and we don't support
GCC in C++03 mode anyway.

Added: 
    

Modified: 
    libcxx/include/__config

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__config b/libcxx/include/__config
index 3e64694f284b..17e6bfe207aa 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -398,9 +398,7 @@
 #elif defined(_LIBCPP_COMPILER_CLANG)
 # define _LIBCPP_ALIGNOF(_Tp) _Alignof(_Tp)
 #else
-// This definition is potentially buggy, but it's only taken with GCC in C++03,
-// which we barely support anyway. See llvm.org/PR39713
-# define _LIBCPP_ALIGNOF(_Tp) __alignof(_Tp)
+# error "We don't know a correct way to implement alignof(T) in C++03 outside of Clang"
 #endif
 
 #define _LIBCPP_PREFERRED_ALIGNOF(_Tp) __alignof(_Tp)


        


More information about the libcxx-commits mailing list