Bug 19658 – C++ enum mangling is wrong on Windows for other integer types

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2019-02-07T11:58:07Z
Last change time
2019-04-13T08:47:51Z
Keywords
C++, industry, mangling, pull
Assigned to
No Owner
Creator
Илья Ярошенко

Comments

Comment #0 by ilyayaroshenko — 2019-02-07T11:58:07Z
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`.
Comment #1 by dlang-bot — 2019-04-12T19:58:20Z
@kinke created dlang/dmd pull request #9605 "Fix Issue 19658 - MSVC++ enum mangling" fixing this issue: - Fix Issue 19658 - MSVC++ enum mangling https://github.com/dlang/dmd/pull/9605
Comment #2 by dlang-bot — 2019-04-13T08:47:51Z
dlang/dmd pull request #9605 "Fix Issue 19658 - MSVC++ enum mangling" was merged into master: - 1bb36043f0e27a6dfe649be796796267c38a31de by Martin Kinkelin: Fix Issue 19658 - MSVC++ enum mangling https://github.com/dlang/dmd/pull/9605