3 ms·
That may be. It sure is broken. What they did: Things of similar base type (so ignoring "signed", "const", etc.) may alias. Everything may alias with "char".
by burfog 8y ago
That may be. It sure is broken. What they did:
Things of similar base type (so ignoring "signed", "const", etc.) may alias. Everything may alias with "char".
What would make more sense:
Any unsigned integer type may alias with any type of the same size; this is not transitive. (so a floating-point type may not alias with a pointer type, but there likely are unsigned integer types that may alias with both) Structs may alias other structs from the beginning until the point at which the types of their content diverge.
Even with that better default, you'd still want easy ways to override it in both directions.