Comment by jotux Comment by jotux a day ago 3 replies Copy Link View on Hacker News https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Typ...
Copy Link ryao a day ago Collapse Comment - What is your point? I already said that GCC defines it even though the C standard does not. As per the GCC developers:> Type punning via unions is undefined behavior in both c and c++.https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118141#c13 Reply View | 2 replies Copy Link jotux a day ago Parent Collapse Comment - > One of the GCC developers told me explicitly that type punning through a union was UB in C, but defined by GCC when I askedI just was citing the source of this for reference. Reply View | 1 reply Copy Link ryao a day ago Root Parent Collapse Comment - I see. Carry on then. :) Reply View | 0 replies
Copy Link jotux a day ago Parent Collapse Comment - > One of the GCC developers told me explicitly that type punning through a union was UB in C, but defined by GCC when I askedI just was citing the source of this for reference. Reply View | 1 reply Copy Link ryao a day ago Root Parent Collapse Comment - I see. Carry on then. :) Reply View | 0 replies
Copy Link ryao a day ago Root Parent Collapse Comment - I see. Carry on then. :) Reply View | 0 replies
What is your point? I already said that GCC defines it even though the C standard does not. As per the GCC developers:
> Type punning via unions is undefined behavior in both c and c++.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118141#c13