[Issue 22880] New: importC: __restrict restrict __restrict__
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 15 16:35:21 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22880
Issue ID: 22880
Summary: importC: __restrict restrict __restrict__
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: trikkuz at gmail.com
It seems that both gcc and clang on linux use __restrict as keyword.
gcc -c test.c
cat test.c
----
int * restrict a;
int * __restrict b;
int * __restrict__ c;
----
gcc -std=c11 -E test.c > test.i
cat test.i
---
# 0 "test.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "test.c"
int * restrict a;
int * __restrict b;
int * __restrict__ c;
---
But:
dmd test.i
---
test.c(2): Error: missing comma or semicolon after declaration of `__restrict`,
found `b` instead
test.c(3): Error: missing comma or semicolon after declaration of
`__restrict__`, found `c` instead
---
--
More information about the Digitalmars-d-bugs
mailing list