[PATCH] [libcxx] Modify language.support tests so they pass or are UNSUPPORTED with c++03.

Eric Fiselier eric at efcs.ca
Thu Oct 23 21:46:22 PDT 2014


================
Comment at: test/depr/depr.c.headers/stdarg_h.pass.cpp:18-22
@@ -17,5 +17,7 @@
 
+#if __cplusplus >= 201103L
 #ifndef va_copy
 #error va_copy not defined
 #endif
+#endif
 
----------------
va_copy is not defined until c++11.

================
Comment at: test/language.support/support.start.term/quick_exit.pass.cpp:11
@@ -10,2 +10,3 @@
 // XFAIL: apple-darwin
+// UNSUPPORTED: c++98, c++03
 
----------------
quick_exit was added in c++11. 

================
Comment at: test/language.support/support.types/nullptr_t.pass.cpp:57
@@ -56,2 +56,3 @@
     assert(!(nullptr > a));
+#ifndef _LIBCPP_HAS_NO_NULLPTR
     std::ptrdiff_t i = reinterpret_cast<std::ptrdiff_t>(nullptr);
----------------
The c++03 nullptr is only convertible to pointers and bool. This appears to be what the standard suggests. However it is not an integral type so it can't be reinterpret cast to a signed integer.

http://reviews.llvm.org/D5958






More information about the cfe-commits mailing list