Bug 20959 – Indexing a pointer of a fwd-declared struct type is NOT a frontend error

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-06-19T17:11:06Z
Last change time
2024-12-13T19:09:29Z
Assigned to
No Owner
Creator
kinke
Moved to GitHub: dmd#19728 →

Comments

Comment #0 by kinke — 2020-06-19T17:11:06Z
struct S; ref foo(S* s) { static assert(__traits(compiles, s[1])); // should fail return s[1]; // ICE for LDC, for DMD: Error: struct `onlineapp.S` unknown size }
Comment #1 by robert.schadek — 2024-12-13T19:09:29Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19728 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB