[Issue 22631] ImportC: support C++11 unscoped enums with underlying type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 23 05:48:53 UTC 2022


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

dave287091 at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #6 from dave287091 at gmail.com ---
Some basic types aren’t handled with the above PR:

// test.c
enum L: long long { // 
    L_A = 1,
};

enum U: unsigned long long { // 
    U_A = 1,
};

enum U2: unsigned { //
    U2_A = 1,
};


test.c(2): Error: use `long` for a 64 bit integer instead of `long long`
test.c(6): Error: basic type expected, not `unsigned`
test.c(6): Error: illegal type combination
test.c(6): Error: identifier or `(` expected
test.c(8): Error: `=`, `;` or `,` expected to end declaration instead of `}`
test.c(10): Error: basic type expected, not `unsigned`
test.c(10): Error: illegal type combination
test.c(10): Error: identifier or `(` expected
test.c(12): Error: `=`, `;` or `,` expected to end declaration instead of `}`

--


More information about the Digitalmars-d-bugs mailing list