diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-26 16:52:19 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-26 16:52:19 +0000 |
commit | f90861165e0a6293dc6c3cc9972975855f451657 (patch) | |
tree | d943423a439ccf6c96a1d0db9311b6c3b5707ecb /gcc/c | |
parent | e560bc44fcec39b0eccb66f802870b2de31770df (diff) | |
download | ppe42-gcc-f90861165e0a6293dc6c3cc9972975855f451657.tar.gz ppe42-gcc-f90861165e0a6293dc6c3cc9972975855f451657.zip |
2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
Joseph Myers <joseph@codesourcery.com>
c/35649
* c-typeck.c (c_common_type): Prefer double_type_node over
other REAL_TYPE types with the same precision.
(convert_arguments): Likewise.
Amend patch as suggested:
From: "Joseph S. Myers" <joseph@codesourcery.com>
In convert_arguments I think you should be comparing TYPE_MAIN_VARIANT
(valtype) against double_type_node and long_double_type_node, rather than
just valtype.
This is PR c/35649 (so include that number in your ChangeLog entry and
close that bug as fixed).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202006 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 4d32d6dce3d..0d9ff67a7be 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,5 +1,7 @@ 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com> + Joseph Myers <joseph@codesourcery.com> + c/35649 * c-typeck.c (c_common_type): Prefer double_type_node over other REAL_TYPE types with the same precision. (convert_arguments): Likewise. diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index 5daae23d141..8b3e3d92f15 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -3164,8 +3164,8 @@ convert_arguments (tree typelist, vec<tree, va_gc> *values, else if (TREE_CODE (valtype) == REAL_TYPE && (TYPE_PRECISION (valtype) <= TYPE_PRECISION (double_type_node)) - && valtype != double_type_node - && valtype != long_double_type_node + && TYPE_MAIN_VARIANT (valtype) != double_type_node + && TYPE_MAIN_VARIANT (valtype) != long_double_type_node && !DECIMAL_FLOAT_MODE_P (TYPE_MODE (valtype))) { if (type_generic) |