https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390

Joseph S. Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #24 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
You note that "values subject to the usual arithmetic conversions can either be
floating-point values or integer values".  Only in the floating-point case is
excess range and precision applicable to them; there is no such concept for
values with integer types (values *resulting* from the usual arithmetic
conversions are a separate matter, where the rules for implicit conversions
must apply to determine when there is excess range and precision).  (I don't
think 5.2.4.2.2 is that well phrased, but I don't think in C99 it requires
excess precision for the results of such conversions from floating-point to
integer.)

The interpretation of C99 rules for excess precision used in GCC has been
explained at length from 2008 onwards.  In case of doubt about whether some
change reflects a defect, or about whether the resolution of a DR against one
standard should be considered also to apply to a previous version, we
deliberately keep compatibility with the existing interpretation for previous
standard versions and only apply the change to newer ones, on the basis that
users of -std= options for old standards should get stability and there is no
way to get a DR resolution for what something "should" mean in an old standard
version (even for features within the current standard but obsolescent, such as
unprototyped functions, in practice you have to come up with your own
reasonable interpretations and stick to them because WG14 doesn't want to
clarify how things should work there).

Reply via email to