D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21962 - importC: Empty enums are accepted as valid code
Summary: importC: Empty enums are accepted as valid code
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords: accepts-invalid, ImportC, pull
Depends on:
Blocks:
 
Reported: 2021-05-24 09:15 UTC by Iain Buclaw
Modified: 2021-05-25 08:59 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Iain Buclaw 2021-05-24 09:15:19 UTC
As per C99 6.7.2.2, empty enum is invalid, and yet, dmd compiles it.
---
enum empty
{
};

enum
{
};
Comment 1 Dlang Bot 2021-05-24 13:38:02 UTC
@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 Dlang Bot 2021-05-25 08:59:05 UTC
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