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

--- Comment #4 from [email protected] ---
(In reply to Steven Schveighoffer from comment #3)
> I'm not sure the UB rules for D and aliasing. In C you definitely can run
> into things like the array cast being considered unrelated. 

As far as I know, C's strict aliasing rule isn't exactly uncontroversial.
Personally, I think it's an abomination.

> The class case is definitely a bug.

Even with the strict aliasing rule, there is a type that is allowed to alias
others. In C it's char. That would be ubyte in D, I guess. The non-class
examples all involve ubyte. So even with C-like strict aliasing, they should be
rejected.

--

Reply via email to