Bug 21200 – const(Class) should be C++ mangled as Class const *

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-08-26T23:00:02Z
Last change time
2024-12-13T19:11:15Z
Assigned to
No Owner
Creator
Walter Bright
See also
https://issues.dlang.org/show_bug.cgi?id=22550
Moved to GitHub: dmd#19777 →

Comments

Comment #0 by bugzilla — 2020-08-26T23:00:02Z
Comment #1 by archon.saratov — 2021-06-20T18:19:03Z
any news?
Comment #2 by moonlightsentinel — 2021-06-20T19:33:04Z
That would allow external code to silently break the type system as soon as references are involved: ========================================== // D extern(C++) class C {} extern(C++) void foo(ref const C); void main() { static immutable C c = new C(); foo(c); } ========================================== // C++ class C; void foo(const C*& c) { c = nullptr; // <= boom } ========================================== (Allthough class + ref should be rare outside of generic code)
Comment #3 by robert.schadek — 2024-12-13T19:11:15Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19777 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB