Ich weiß jetzt nicht, wie das beim GCC ist. aber normalerweise schreibt man doch einfach
floatval = (float)shortval;
dann hat C das Problem.
Oder willst du dir das Bit-Gefummel unbedingt antun ?