www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - =?UTF-8?B?W0lzc3VlIDIyMjk0XSBOZXc6IGltcG9ydEM6IGVudW1zIGFyZW4=?=

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

          Issue ID: 22294
           Summary: importC: enums aren’t placed in surrounding namespace.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dave287091 gmail.com

enum {A, B, C};

int bar[C]; // Error: undefined identifier `C`


In fact, there is no way to even access the above enum.


This pattern exists in some header files.

--
Sep 09 2021