Bug 22954 – Header generator emits extern(C) member functions

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-29T09:58:20Z
Last change time
2022-03-29T11:01:06Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2022-03-29T09:58:20Z
The header generator exports functions marked as `extern(C)`. But those functions receive D mangling and hence aren't callable from a plain member declaration (that always receives C++ mangling in C++)
Comment #1 by dlang-bot — 2022-03-29T09:58:45Z
@MoonlightSentinel updated dlang/dmd pull request #13915 "Fix - dtoh: Ignore member functions with C linkage" fixing this issue: - Fix 22954 - dtoh: Ignore member functions with C linkage Those functions receive D mangling and hence aren't easily callable via the header file. Note that C++ does the same for members in an `extern "C"` aggregate (=> mangle as C++ symbol). ` https://github.com/dlang/dmd/pull/13915
Comment #2 by dlang-bot — 2022-03-29T11:01:06Z
dlang/dmd pull request #13915 "Fix 22954 - dtoh: Ignore member functions with C linkage" was merged into master: - 29d1c5a0bd08b7b24d7f82029baaf44e066b0e98 by MoonlightSentinel: Fix 22954 - dtoh: Ignore member functions with C linkage Those functions receive D mangling and hence aren't easily callable via the header file. Note that C++ does the same for members in an `extern "C"` aggregate (=> mangle as C++ symbol). ` https://github.com/dlang/dmd/pull/13915