https://issues.dlang.org/show_bug.cgi?id=21932
Issue ID: 21932
Summary: importC: struct 'STRUCT' conflicts with struct
'STRUCT'
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
The parser allows implicit typedefs, which is not valid C.
---
struct STRUCT { void *opaque; };
STRUCT mystruct; // Should error.
---
Instead, it errors on the correct way to declare variables of type 'struct'.
---
struct STRUCT { void *opaque; };
struct STRUCT mystruct; // Error
---
Same goes for enums
---
enum ENUM { ENUM_a };
enum ENUM myenum; // Error
---
--