Whenever I see examples of union, they are always different types. For example, from MSDN:
// declaring_a_union.cpp union DATATYPE // Declare union type {
An issue would arise only if you want to have unique values for the two variables. In your use-case, it should work fine.