[PATCH] D26376: Undef stdatomic.h macro definitions that are defining functions provided in libc++ <atomic>
Mehdi AMINI via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 5 11:34:46 PST 2016
mehdi_amini added a comment.
In https://reviews.llvm.org/D26376#597614, @mclow.lists wrote:
> More info - The following code:
>
> #include <stdatomic.h>
> int main () {}
>
>
> fails to compile on either gcc 6.2 (locally), gcc 7 head (online compiler) or MSVC (online compiler).
Interesting, that lead me to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932 which describes the issue I believe.
One of the example is that we should guarantee ABI compatibility between C and C++ for such code:
#ifdef __cplusplus
#include <atomic>
using namespace std;
#else
#include <stdatomic.h>
#endif
struct s {
atomic_int i;
};
Do you know if we're providing this guarantee today?
In https://reviews.llvm.org/D26376#613186, @EricWF wrote:
> Yeah this seems like a configuration that simply can't be supported. I'm not sure if this patch is a great idea.
OK, let's abandon this then!
https://reviews.llvm.org/D26376
More information about the cfe-commits
mailing list