[Issue 21932] New: importC: struct 'STRUCT' conflicts with struct 'STRUCT'
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 19 17:59:55 UTC 2021
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: nobody at puremagic.com
Reporter: ibuclaw at gdcproject.org
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
---
--
More information about the Digitalmars-d-bugs
mailing list