[Issue 22728] New: importC: error: enum has no members when compiling typedef’d enum.
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Feb  2 22:06:07 UTC 2022
    
    
  
https://issues.dlang.org/show_bug.cgi?id=22728
          Issue ID: 22728
           Summary: importC: error: enum has no members when compiling
                    typedef’d enum.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dave287091 at gmail.com
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.
--
    
    
More information about the Digitalmars-d-bugs
mailing list