From 6.3.1.5 of the C99 standard:
Wiki Markup IfWhen a {{double}} is demoted to {{float}} \[or\] a {{long double}} is demoted to {{double}} or {{float}}...\[and\]if the value being converted is outside the range of values that can be represented, the behavior is undefined.
...