...
Accessing an object by means of any other lvalue expression (other than unsigned char
) is undefined behavior 3736.
Noncompliant Code Example
...
According to the C Standard, 6.7.7.3 [ISO/IEC 9899:2024], using two or more incompatible arrays in an expression is undefined behavior. (See also undefined behavior 7673.)
For two array types to be compatible, both should have compatible underlying element types, and both size specifiers should have the same constant value. If either of these properties is violated, the resulting behavior is undefined.
...