[Issue 22304] New: importC: parsing gnu-style attributes fails if return type is pointer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 14 01:12:25 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22304

          Issue ID: 22304
           Summary: importC: parsing gnu-style attributes fails if return
                    type is pointer
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dave287091 at gmail.com

The following c code compiles:

int
__attribute__((__always_inline__))
foo(void){
    return 0;
}

However, the following does not:

int *
__attribute__((__always_inline__)) // Error: identifier or `(` expected
foo(void){
    return 0;
} // Error: identifier or `(` expected

--


More information about the Digitalmars-d-bugs mailing list