Bug 21994 – (char*)"string" fails to compile

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-06-05T09:12:11Z
Last change time
2021-06-05T14:44:55Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
Walter Bright

Comments

Comment #0 by bugzilla — 2021-06-05T09:12:11Z
void test() { char* q = (char*)"hello"; } fails to recognize (char*) as the start of a cast.
Comment #1 by dlang-bot — 2021-06-05T09:25:49Z
@WalterBright updated dlang/dmd pull request #12635 "fix Issue 21994 (char*)expression fails to compile" fixing this issue: - fix Issue 21994 (char*)expression fails to compile https://github.com/dlang/dmd/pull/12635
Comment #2 by dlang-bot — 2021-06-05T14:44:55Z
dlang/dmd pull request #12635 "fix Issue 21994 (char*)expression fails to compile" was merged into master: - 6fab5e1dae3892d9431a7a224f1df882caac407e by Walter Bright: fix Issue 21994 (char*)expression fails to compile https://github.com/dlang/dmd/pull/12635