2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 19 Oct 2008 22:53:01 +0000 (22:53 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 19 Oct 2008 22:53:01 +0000 (22:53 +0000)
commit8021532ee92d1caef4e09289c4bfb3fbcdd24126
treeefc7e715925fd1cb536642887f046421f2e8cfc7
parent635a36e421abab3586e4a418bdff6dec9ed3e580
2008-10-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c++/37004
cp/
* typeck.c (cp_common_type): New. The same as
type_after_usual_arithmetic_conversions but without promotions.
(type_after_usual_arithmetic_conversions): Do the promotions and
call cp_common_type.
(common_type): Make it behave like the C version of this
function. Do not handle pointer types.
(common_pointer_type): Move handling of pointer types from
common_type to here.
(cp_build_binary_op): Use common_pointer_type instead of
common_type in call to pointer_diff.
Use cp_common_type instead of common_type.
* cp-tree.h (common_pointer_type): Declare.
testsuite/
* g++.dg/warn/Wconversion-pr34389.C: Remove XFAIL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141233 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wconversion-pr34389.C