Bug 23185 – importC: anonymous struct inside __builtin_offsetof doesn't compile

Status
RESOLVED
Resolution
WORKSFORME
Severity
blocker
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-06-13T23:00:54Z
Last change time
2022-07-07T06:38:13Z
Keywords
ImportC
Assigned to
No Owner
Creator
ryuukk_

Comments

Comment #0 by ryuukk.dev — 2022-06-13T23:00:54Z
The following code doesn't compile: ``` void test() { int a = __builtin_offsetof(struct { int a;}, a); } ```
Comment #1 by bugzilla — 2022-07-07T06:38:13Z
It does when I try it. If you can reproduce the problem with the latest dmd, please reopen (and please give what error message you're seeing).