← Back to index
|
Original Bugzilla link
Bug 22728 – importC: error: enum has no members when compiling typedef’d enum.
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-02-02T22:06:07Z
Last change time
2022-02-03T05:59:09Z
Keywords
ImportC, rejects-valid
Assigned to
No Owner
Creator
dave287091
Comments
Comment #0
by dave287091 — 2022-02-02T22:06:07Z
Encountered this when trying to compile sqlite: // repo.c typedef enum task_role { // repo.c(2): Error: `enum task_role` has no members TASK_RENICED = -1, TASK_UNSPECIFIED = 0, TASK_FOREGROUND_APPLICATION = 1, TASK_BACKGROUND_APPLICATION = 2, TASK_CONTROL_APPLICATION = 3, TASK_GRAPHICS_SERVER = 4, TASK_THROTTLE_APPLICATION = 5, TASK_NONUI_APPLICATION = 6, TASK_DEFAULT_APPLICATION = 7, TASK_DARWINBG_APPLICATION = 8, } task_role_t; If it’s a regular enum declaration instead of a typedef there is no error.
Comment #1
by maxsamukha — 2022-02-03T05:59:09Z
*** This issue has been marked as a duplicate of issue 22726 ***