[PATCH] D23719: [libc++] Use C11 for atomics check

Ben Craig via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 19 11:15:18 PDT 2016


bcraig added a comment.

In https://reviews.llvm.org/D23719#520953, @smeenai wrote:

> @bcraig: `__STDC_NO_ATOMICS__` wouldn't be defined for pre-C11 compilers either, right?
>
> From what I understand of the original code sample, one of the purposes was to check for 64-bit atomic support on 32-bit systems (hence the use of `uintmax_t` and the check for `__atomic_fetch_add_8`). I don't really know of a portable way of accomplishing that without at least including `<stdint.h>`.


Given the choice of including stdatomic.h or stdint.h, I'll gladly take stdint.h.  libc++ shouldn't require a C11 enabled C library.  C++14 only requires C99.


https://reviews.llvm.org/D23719





More information about the cfe-commits mailing list