https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61876
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to ktkachov from comment #7)
> (In reply to jos...@codesourcery.com from comment #6)
> > Under Annex F the cast isn't undefined behavior but raising the "invalid"
> > exception and returning an unspecified value (which must be a valid value
> > of type long, i.e. the program must behave as if each execution of the
> > cast in the abstract machine has some particular value of type long it
> > returns).
>
> In my copy at 6.3.1.4 on Real floating and integer conversions it says:
> If the value of the integral part cannot be represented by the integer type,
> the behavior is undefined.
Making Annex F explicitly take precedence over the generic text is DR#442.