> I notice this statement in the documentation: > Moreover, the use of type punning or aliasing to toggle the storage > order is not supported; that is to say, a given scalar object cannot > be accessed through distinct types that assign a different storage > order to it. > --- CUT --- > But I am not 100% sure that is the case here but I hope I am wrong in > saying this is not supported.
This seems to me a fairly standard example of type punning: uint32_t u = 0x12345678; uint32_t bu = ((upal_u32be_t*)&u)->val; u = 0x12345678; uint32_t lu = ((upal_u32le_t*)&u)->val; u is accessed through upal_u32be_t and upal_u32le_t, i.e. BE and LE. -- Eric Botcazou