C/C++ quality of implementation: floating-point constant conversion

N8TM@aol.com N8TM@aol.com
Tue Feb 24 22:37:00 GMT 1998


Abraham Agay (of HUJI) and I were discussing a similar situation last week:
g77 does not issue any warning about integer constant expressions which
overflow e.g. 10**11, it just uses whatever value results from trying to
calculate it, even when the result is used as a float.  A warning would be
desirable. I did intend to have a look to see how difficult it might be to do
this, but haven't.

Until the language committees add standard ways to specify Inf and NaN to the
language, I'd like to retain the ability to use (DBL_MAX+DBL_MAX) and
(DBL_MAX+DBL_MAX)*0 as ways of specifying them.  Warnings are reasonable, but
not aborts.

Tim



More information about the Gcc-bugs mailing list