digitalmars.D.bugs - [Issue 21965] New: importC: Anonymous top-level struct or union
- d-bugmail puremagic.com (24/24) May 24 2021 https://issues.dlang.org/show_bug.cgi?id=21965
https://issues.dlang.org/show_bug.cgi?id=21965 Issue ID: 21965 Summary: importC: Anonymous top-level struct or union triggers AssertError dsymbolsem.d(4787) Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: critical Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: ibuclaw gdcproject.org Similar to issue 21945, but this is for structs and unions that define no instances. --- struct { int var; }; typedef struct { int var }; --- Both examples produce warnings with a C compiler as they are no-op. It should perhaps be an error with D though, as such declarations are semantically invalid, as per the assertions that it triggers. --
May 24 2021