This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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] |
These two patches add decimal float support to Wconversion. Basically, they are the same patches that have been in the patch queue since December 2006. The patch is divided in two parts that have been tested independently. The first part adds the functionality to detect whether a decimal<->binary conversion alters a value. The second part adds the logic for Wconversion and testcases.
There are two versions of the first part: part1-try1 [1] normalises and compares with bitwise identity; part1-try2 [2] compares equality in value. Not sure which one is more correct or efficient (if any).
Bootstrapped and regression tested with --enable-languages=all --enable-decimal-float in i686-pc-linux-gnu.
If no one else is (really) interested in seeing this committed, I am not going to pursue this any further because I want to focus now on other things (this year GSoC project for example).
[1] http://gcc.gnu.org/ml/gcc-patches/2006-11/msg01508.html [2] http://gcc.gnu.org/ml/gcc-patches/2006-11/msg02018.html
2007-05-19 Janis Johnson <janis187@us.ibm.com> Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* dfp.c (decimal_normalize): Define. * dfp.h (decimal_normalize): Declare. * real.c (normalize): Normalize also dfp values. (exact_real_truncate): Handle truncating from dfp to binary and viceversa. (real_isinteger): Add dfp support.
* 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.
* c-typeck.c (convert_arguments): Delete code that handles conversions between decimal and binary float types. * c-common.c (conversion_warning): Handle conversions between decimal and binary float types.
testsuite/ * gcc.dg/dfp/Wconversion-dfp.c: New. * gcc.dg/dfp/Wtraditional-conversion-2.c: Remove. * gcc.dg/dfp/wtr-conversion-1.c: Remove.
Attachment:
wconversion-dfp-part1-try1.diff
Description: Text document
Attachment:
wconversion-dfp-part1-try2.diff
Description: Text document
Attachment:
wconversion-dfp-part2.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |