https://issues.dlang.org/show_bug.cgi?id=17287

--- Comment #5 from [email protected] ---
(In reply to Илья Ярошенко from comment #4)
> (In reply to hsteoh from comment #3)
> > I've used zero-length static arrays at the end of structs before, and they
> > work, for the most part.  I'm surprised having a zero-length member in the
> > middle of a struct causes an ICE, though. Or is it the zero-length ctor
> > parameter that's causing the problem?
> 
> It is all factors together. No one line can be removed to reduce this
> example.

We've had the same issue with LDC. Zero-length static arrays are so special
because they are the only type with a size of 0. Empty structs have a size of
1. If I recall correctly, we ended up ignoring zero-sized aggregate fields in
the backend and passing/returning them as byte (analogous to empty structs).

--

Reply via email to