[Issue 23770] New: ImportC: error on gnu atomic builtins
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 10 16:46:12 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23770
Issue ID: 23770
Summary: ImportC: error on gnu atomic builtins
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: ImportC
Severity: minor
Priority: P4
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dkorpel at live.nl
I'm getting an error compiling code that assumes gnu atomic builtins are
present, such as `__atomic_load_n`. Reduced:
```
#ifdef __TINYC__
#elif defined(_WIN32)
#else
int atomic_load(const volatile int *p)
{
#ifdef __ATOMIC_RELAXED
return __atomic_load_n(p, __ATOMIC_RELAXED);
#endif
}
#endif
```
```
Error: undefined identifier `__atomic_load_n`
```
Other builtins:
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
--
More information about the Digitalmars-d-bugs
mailing list