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
Solution 2 is portable - type punning through unions has always been legal in C99, and it was made explicit with TC3, which added the following footnote to section 6.5.2.3:
If the member used to access the contents of a union object is not the same as the member last used to store a value in the object, the appropriate part of the object representation of the value is reinterpreted as an object representation in the new type as described in 6.2.6 (a process sometimes called "type punning"). This might be a trap representation.
Annex J still lists it as unspecfied behaviour, which is a known defect and has been corrected with C11, which changed
The value of a union member other than the last one stored into [is unspecified]
to
The values of bytes that correspond to union members other than the one last stored into [are unspecified]
It's not that big a deal as the annex is only informative, not normative.
Keep in mind that you can still end up with undefined behaviour, eg