I want to reinterpret data of one type as another type in a portable way (C99). I am not talking about casting, I want a reinterpretation of some given dat
the data type int
is an example of a non-portable type since endianness can change byte order between platforms.
if you want to be portable you need to define your own types, then implement them on each platform that you want to port to. Then define conversion methods for your data types. That is as far as I know the only way to have full control of byte orders etc.