[Issue 19658] New: C++ enum mangling is wrong on Windows for other integer types

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 7 11:58:07 UTC 2019


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

          Issue ID: 19658
           Summary: C++ enum mangling is wrong on Windows for other
                    integer types
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ilyayaroshenko at gmail.com

D generates the wrong C++ mangling names for enums on Windows when not an `int`
integral type is used for enum declaration.

D:
extern(C++):
enum E : short {a, b}
E foo(E e) {return e;}

C++:
enum class E : short {a, b};
E foo(E e) {return e;}

For all integer types (including char) C++ generates the same mangling name.
However, D generates unique mangling name for each integer type. All mangling
name should have the same mangling as the common enum variant for `int`.

--


More information about the Digitalmars-d-bugs mailing list