Bug 22402 – importC: Error: can't subtract '__tag2[1]' from pointer

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-10-17T13:31:14Z
Last change time
2021-10-21T21:39:33Z
Keywords
ImportC, pull, rejects-valid
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2021-10-17T13:31:14Z
--- typedef struct { short c; } S1; typedef struct { S1 *a; S1 b[1]; } S2; int f1(S1 *a, S1 b[1]) { return a - b; // OK } int f2(S2 *s) { return s->a - s->b; // Error }
Comment #1 by dlang-bot — 2021-10-17T14:18:17Z
@ibuclaw created dlang/dmd pull request #13181 "fix Issue 22402 - importC: Error: can't subtract '__tag2[1]' from pointer" fixing this issue: - fix Issue 22402 - importC: Error: can't subtract '__tag2[1]' from pointer https://github.com/dlang/dmd/pull/13181
Comment #2 by dlang-bot — 2021-10-19T01:53:02Z
dlang/dmd pull request #13181 "fix Issue 22402 - importC: Error: can't subtract '__tag2[1]' from pointer" was merged into stable: - 09ee198802cb38caf825d1b3896efedb5bd149bd by Iain Buclaw: fix Issue 22402 - importC: Error: can't subtract '__tag2[1]' from pointer https://github.com/dlang/dmd/pull/13181
Comment #3 by dlang-bot — 2021-10-21T21:39:33Z
dlang/dmd pull request #13209 "Merge stable into master" was merged into master: - e213c70f38b9a6765aee9c9adeee1145db09c112 by Iain Buclaw: fix Issue 22402 - importC: Error: can't subtract '__tag2[1]' from pointer https://github.com/dlang/dmd/pull/13209