[Bug c/35712] New: decimal float literal constant zero loses significant trailing zeroes
janis at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Mar 26 23:58:00 GMT 2008
Decimal floating point types support significant trailing zeroes to
specify how much precision a value has. Trailing zeroes are relevant
even for values of zero; for example, rounding 1.e-11dd to 10 places
after the decimal point results in 0.e-10dd.
The draft Technical Report N1241 for ISO/IEC TR 24732 doesn't specify
this directly, but section 9.5 "Formatted input/output specifiers"
shows expected output for five different representations of zero:
0, -0, 0.000000, 0e-07, and 0e+02.
Currently GCC converts all decimal float literal values of zero to
0.DF, 0.DD, or 0.DL.
I'm testing a patch to fix this but want a PR to record the issue.
--
Summary: decimal float literal constant zero loses significant
trailing zeroes
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: c
AssignedTo: janis at gcc dot gnu dot org
ReportedBy: janis at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35712
More information about the Gcc-bugs
mailing list