Bug 21962 – importC: Empty enums are accepted as valid code

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-05-24T09:15:19Z
Last change time
2021-05-25T08:59:05Z
Keywords
accepts-invalid, ImportC, pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2021-05-24T09:15:19Z
As per C99 6.7.2.2, empty enum is invalid, and yet, dmd compiles it. --- enum empty { }; enum { };
Comment #1 by dlang-bot — 2021-05-24T13:38:02Z
@ibuclaw created dlang/dmd pull request #12576 "fix Issue 21962 - importC: Empty enums are accepted as valid code" fixing this issue: - fix Issue 21962 - importC: Empty enums are accepted as valid code https://github.com/dlang/dmd/pull/12576
Comment #2 by dlang-bot — 2021-05-25T08:59:05Z
dlang/dmd pull request #12576 "fix Issue 21962 - importC: Empty enums are accepted as valid code" was merged into master: - 5c85929d7df8bd2e1e49bee8e3a61f70b220f7ba by Iain Buclaw: fix Issue 21962 - importC: Empty enums are accepted as valid code https://github.com/dlang/dmd/pull/12576