mirror of
https://github.com/dlang/dmd.git
synced 2025-04-28 14:10:11 +03:00
Importc: FreeBSD compiles stdatomic.h (#15041)
This commit is contained in:
parent
511036f31e
commit
ab62befd47
4 changed files with 7 additions and 3 deletions
|
@ -2307,9 +2307,9 @@ final class CParser(AST) : Parser!AST
|
|||
tk = peek(tk);
|
||||
if (isTypeName(tk) && tk.value == TOK.rightParenthesis)
|
||||
{
|
||||
nextToken();
|
||||
nextToken();
|
||||
t = cparseTypeName();
|
||||
// TODO - implement the "atomic" part of t
|
||||
tkwx = TKW.x_Atomic;
|
||||
break;
|
||||
}
|
||||
|
@ -2578,6 +2578,7 @@ final class CParser(AST) : Parser!AST
|
|||
}
|
||||
|
||||
case TKW.xtag:
|
||||
case TKW.x_Atomic: // no atomics for you
|
||||
break; // t is already set
|
||||
|
||||
default:
|
||||
|
|
|
@ -41,13 +41,11 @@
|
|||
#ifndef __linux__
|
||||
#ifndef _MSC_VER
|
||||
#ifndef __APPLE__ // /Applications/Xcode-14.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/stdatomic.h(80): Error: type-specifier is missing
|
||||
#ifndef __FreeBSD__ // /stdatomic.h(162): Error: found `volatile` when expecting `{`
|
||||
#include <stdatomic.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
@ -388,6 +388,9 @@ __attribute__((static, unsigned, long, const, extern, register, typedef, short,
|
|||
_Thread_local, int, char, float, double, void, _Bool, _Atomic))
|
||||
int test22196();
|
||||
|
||||
_Atomic(_Bool) atomicbool;
|
||||
|
||||
|
||||
/***************************************************/
|
||||
// https://issues.dlang.org/show_bug.cgi?id=22245
|
||||
|
||||
|
|
|
@ -102,6 +102,8 @@
|
|||
|
||||
#if __FreeBSD__
|
||||
#define __volatile volatile
|
||||
#define __sync_synchronize()
|
||||
#define __sync_swap(A, B) 1
|
||||
#endif
|
||||
|
||||
#if _MSC_VER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue