Manuel LÃpez-IbÃÃez - (try 2) [4.3] making a few real functions work with dfp (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: "Manuel LÃpez-IbÃÃez"
- To: "Ben Elliston"
- Cc: gcc-patches
- Date: Thu, 30 Nov 2006 00:45:39 +0000
- Subject: (try 2) [4.3] making a few real functions work with dfp
It seems you didn't like my patch. No problem, I have another. :-)
So again, this patch makes exact_real_truncate() and real_isinteger() handle dfp values correctly.
In order to do so, it compares decimal floating point for equality in value instead of bitwise identity. No normalisation is performed in this patch. Still, I am not sure this is more correct that normalising, since here NaN, infinite and signed zeroes are not handled in the same way as with real_identical. But I have run out of ideas, and without this I cannot implement support for dfp in the new Wconversion option.
Bootstrapped and tested with --enable-languages=all --enable-decimal-float for trunk revision 119259 on i686-pc-linux-gnu
2006-11-30 Manuel Lopez-Ibanez manu@gcc.gnu.org
- real.c (exact_real_truncate): Use REAL_VALUES_EQUAL to compare decimal floating point values instead of real_identical since dfp values are not normalised by design. (real_isinteger): Likewise.
Attachment:wcoercion-6-decimal-float-part1-try2.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |