[Issue 21965] New: importC: Anonymous top-level struct or union triggers AssertError at dsymbolsem.d(4787)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 24 14:46:27 UTC 2021


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

          Issue ID: 21965
           Summary: importC: Anonymous top-level struct or union triggers
                    AssertError at dsymbolsem.d(4787)
           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

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.

--


More information about the Digitalmars-d-bugs mailing list