re PR c/35649 (Incorrect printf warning: expect double has float)
authorJoern Rennecke <joern.rennecke@embecosm.com>
Mon, 26 Aug 2013 16:52:19 +0000 (16:52 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Mon, 26 Aug 2013 16:52:19 +0000 (17:52 +0100)
commit0fdd4508af3f61f9e4fd24ff4d99013db3ae82c7
treed943423a439ccf6c96a1d0db9311b6c3b5707ecb
parent907555cee37c75c7b82b173b158379d9f4c547a4
re PR c/35649 (Incorrect printf warning: expect double has float)

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).

Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
From-SVN: r202006
gcc/c/ChangeLog
gcc/c/c-typeck.c