It is invalid. You cannot and should not store address of float variable in pointer to integer. As you are not guaranteed that size of integer and float would match, to have some arbitrary implementation of floating point numbers or integral numbers, it is undefined behavior at best.