@johnregehr Hm, but maybe it's possible to decouple the question of assignments of struct with diff tags and their aliasing though...
@ch3root @spun_off The language in the standard is not sufficiently clear to say.
-
-
@RichFelker @spun_off My reading goes like this. Consider struct s { int i; } x; The effective type of these 4 bytes is either struct s or\ -
@RichFelker @spun_off int, right? I can be accesses both as x and as x.i, i.e. with types struct s and int. -
@RichFelker @spun_off C11, 6.5p7, is not symmetric. The item before the last says that accessing int with struct s is ok. But there is\ -
@RichFelker @spun_off no text in the standard that permits to access struct s as int. Hence the only possible reading is that the effective\ -
@RichFelker @spun_off type of the object in this case is int. Hence there is nothing that prevents access to it as struct not_s.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.