2 ms·
This is not considering the document as a whole. I will defer to the GCC developers on what the document means on this.
by ryao 1y ago
This is not considering the document as a whole. I will defer to the GCC developers on what the document means on this.
- trealira 1y agoI'm interested in hearing how considering the document as a whole leads to a different conclusion.
- jcranmer 1y agoI am a member of the C standards committee, and I'm telling you you're wrong here. Martin Uecker is also member of the C standards committee, and has just responded to that bug saying that the comment you linked is wrong. I, and others here, have quoted literal standards text to you explaining why type punning through unions is well-defined behavior in C. I don't know who Andrew Pinski is, but they're factually incorrect regarding the legality of type punning via unions in C.
- uecker 1y agoAndrew is a GCC developer who is very competent (much more than myself regarding GCC), but I think he was mistakenly assuming the C++ rules apply to C here as well.