Skip to content

Commit 0218b88

Browse files
authored
Merge pull request #1598 from martin-frbg/issue1593-2
Restore _Atomic define before stdatomic.h for old gcc
2 parents a4af886 + 83da278 commit 0218b88

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

common.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,12 @@ __declspec(dllimport) int __cdecl omp_get_num_procs(void);
652652
#endif
653653

654654
#if (__STDC_VERSION__ >= 201112L)
655+
#if defined(C_GCC) && ( __GNUC__ < 7)
656+
// workaround for GCC bug 65467
657+
#ifndef _Atomic
658+
#define _Atomic volatile
659+
#endif
660+
#endif
655661
#include <stdatomic.h>
656662
#else
657663
#ifndef _Atomic

0 commit comments

Comments
 (0)