www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22314] New: ImportC: fails to parse gnu attributes on enum

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

          Issue ID: 22314
           Summary: ImportC: fails to parse gnu attributes on enum members
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dave287091 gmail.com

An example taken from
https://gcc.gnu.org/onlinedocs/gcc/Enumerator-Attributes.html:

enum E {
  oldval __attribute__((deprecated)), // Error: found `__attribute__` when
expecting `}`
  newval
};

int
fn (void)
{
  return oldval;
}

This feature is used in some macOS system headers.

--
Sep 18