3 ms·
> I don't think the standard explicitly forbids it. I already wrote exactly where the standard explicitly forbids it in the message you replied to.
by hvdijk 6y ago
> I don't think the standard explicitly forbids it.
I already wrote exactly where the standard explicitly forbids it in the message you replied to.
- raxxorrax 6y agoI looked it up... > both operands are pointers to qualified or unqualified versions of compatible types Not sure, but I still would say he was correct. The compiler might not be able to check if the types are compatible, so the warning as a standard behavior is anticipatory. Sensible, yes.
- hvdijk 6y ago"Compatible type" is defined in the standard as well. It doesn't mean "whatever the compiler thinks is compatible", it's what the section "Compatible type and composite type" defines as compatible. Different struct types are not compatible.