The wording in the referenced answer is slightly erroneous, so let's get that ironed out first:
One object never aliases another object, but two pointers can "alias" the same object (meaning, the pointers point to the same memory location - as M.M. pointed out, this is still not 100% correct wording but you get the Idea). Also, the standard itself doesn't (to the best of my knowledge) actually talk about strict aliasing at all, but only gives rules, through which kinds of expressions a object may be accessed or not. Compiler flags like '-fno-strict-aliasing' tell the compiler whether it can assume the programmer followed those rules (so it can perform optimizations based on that assumption) or not.
Now to your question: Any object can be accessed through a pointer to char, but a char object (especially a char array) may not be accessed through most other pointer types.
Based on that the compiler can/must make the following assumptions:
- If the type of the actual object itself is not known, a
char* and T* could always point to the same object (alias each other) -> symmetric relationship.
- If
T1and T2 are not "related" and not char, then T1* and T2* may never point to the same object -> symmetric relationship
- A
char* may point to a char OR a T object
- A
T* may NOT point to an char object -> asymmetric relationship
I believe, the main rationale behind the asymmetric rules about accessing object through pointers is that a char array might not satisfy the alignment requirements of e.g. an int.
So, even without compiler optimizations based on the strict aliasing rule, e.g. writing an int to the location of a 4-byte char array at addresses 0x1,0x2,0x3,0x4 will - in the best case - result in poor performance and - in the worst case - access a different memory location, because the CPU instructions might ignore the lowest two address bits when writing a 4-byte value (so here this might result in a write to 0x0,0x1,0x2 and 0x3).
Please also be aware that the meaning of "related" differs from language to language (between C and C++), but that is not relevant for your question.