March 10, 2023 [Issue 23770] New: ImportC: error on gnu atomic builtins | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: dkorpel@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 -- |
Copyright © 1999-2021 by the D Language Foundation