https://issues.dlang.org/show_bug.cgi?id=22598
Issue ID: 22598
Summary: importC: Add support for __extension__ keyword
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
In common system headers, the __extension__ keyword can crop up, i.e in
assert.h, assert() is defined as:
---
# define assert(expr) \
((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \
if (expr) \
; /* empty */ \
else \
__assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \
}))
---
Here the __extension__ disables any ISO C warnings caused by the non-standards
conforming syntax ({ ... }).
By not allowing the same to be compilable by ImportC would prevent any code
that uses assert.h from working.
--