Bug 22286 – importC: (identifier)(other_identifier) incorrectly parsed as a cast-expression

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-09-07T17:25:55Z
Last change time
2021-09-30T01:46:07Z
Keywords
ImportC, pull, rejects-valid
Assigned to
No Owner
Creator
dave287091

Comments

Comment #0 by dave287091 — 2021-09-07T17:25:55Z
The problem is demonstrated by the following small program: // example.c int foo(int b){ return b; } int main(){ int b = 3; int x = (foo)(b); // Error: function `examp.foo` is used as a type return 0; }
Comment #1 by dlang-bot — 2021-09-16T08:46:28Z
@WalterBright created dlang/dmd pull request #13078 "fix Issue 22286 - importC: (identifier)(other_identifier) incorrectly…" fixing this issue: - fix Issue 22286 - importC: (identifier)(other_identifier) incorrectly parsed as a cast-expression https://github.com/dlang/dmd/pull/13078
Comment #2 by dlang-bot — 2021-09-18T05:36:54Z
dlang/dmd pull request #13078 "fix Issue 22286 - importC: (identifier)(other_identifier) incorrectly…" was merged into stable: - 27f8449eaa26469e0e39085d904bc5e0937d63ce by Walter Bright: fix Issue 22286 - importC: (identifier)(other_identifier) incorrectly parsed as a cast-expression https://github.com/dlang/dmd/pull/13078
Comment #3 by dlang-bot — 2021-09-30T01:46:07Z
dlang/dmd pull request #13108 "merge stable" was merged into master: - 44326b85cb0980f17ea6d1e66449739715657274 by Walter Bright: fix Issue 22286 - importC: (identifier)(other_identifier) incorrectly parsed as a cast-expression (#13078) https://github.com/dlang/dmd/pull/13108