Bug 21530 – dtoh: Identifiers need to be sanitized wrt. reserved C++ keywords

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-01-09T16:30:32Z
Last change time
2021-01-14T22:42:07Z
Keywords
pull
Assigned to
No Owner
Creator
kinke

Comments

Comment #0 by kinke — 2021-01-09T16:30:32Z
E.g., from frontend.h: enum class PASS { inline = 7 // needs to be sanitized to `inline_` or so }; See https://en.cppreference.com/w/cpp/keyword.
Comment #1 by dlang-bot — 2021-01-10T16:09:58Z
@MoonlightSentinel created dlang/dmd pull request #12122 "Fix 21530 - dtoh: Sanitize identifiers wrt. reserved C++ keywords" fixing this issue: - Fix 21530 - dtoh: Sanitize identifiers wrt. reserved C++ keywords Extends the check for C++ keywords to append an underscore instead of raising an error whenever the actual name doesn't matter for binary compatibility. https://github.com/dlang/dmd/pull/12122
Comment #2 by dlang-bot — 2021-01-14T22:42:07Z
dlang/dmd pull request #12122 "Fix 21530 - dtoh: Sanitize identifiers wrt. reserved C++ keywords" was merged into master: - 843bc8549e264b9a4b127a6da8f98524d52f23b1 by MoonlightSentinel: Fix 21530 - dtoh: Sanitize identifiers wrt. reserved C++ keywords Extends the check for C++ keywords to append an underscore instead of raising an error whenever the actual name doesn't matter for binary compatibility. https://github.com/dlang/dmd/pull/12122