[PATCH] D24903: [libcxx] [include] Declare __STDC_*_MACROS for C++11 compat in old libc

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 25 14:18:33 PDT 2016

EricWF added inline comments.

Comment at: include/stdint.h:24
@@ +23,3 @@
+#if __cplusplus >= 201103L && !defined(__STDC_LIMIT_MACROS)
Please take a look at how `clang/lib/Headers/stdint.h` handles forwarding this header, and use a solution similar to that.

Comment at: include/stdint.h:27
@@ +26,3 @@
+#if __cplusplus >= 201103L && !defined(__STDC_CONSTANT_MACROS)
I think we should define `__STDC_LIMIT_MACROS` and `__STDC_CONSTANT_MACROS` even if we are in C++03, since we don't provide strict C++03 conformance. However we should still check if `__cplusplus` is defined.


More information about the cfe-commits mailing list