June 02 [Issue 24580] New: ImportC: Asm label after attributes results in syntax error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24580 Issue ID: 24580 Summary: ImportC: Asm label after attributes results in syntax error Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: tim.dlang@t-online.de The following line can currently not be parsed by ImportC: ``` int ioctl(int __fd, unsigned __request, ...) __attribute__((overloadable)) __attribute__((enable_if(1, ""))) asm("ioctl"); ``` DMD prints the following error instead: ``` Error: `=`, `;` or `,` expected to end declaration instead of `asm` ``` The line is from an Android header: https://android.googlesource.com/platform/bionic/+/364fc76047989ef29100d52722cb7d918236cfd4/libc/include/bits/ioctl.h#60 The `asm` part is an asm label (https://clang.llvm.org/docs/AttributeReference.html#asm). ImportC can already parse all attributes and the asm label, but not in this order. -- |
Copyright © 1999-2021 by the D Language Foundation