OSDN Git Service

gcc/cp/ChangeLog:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Jan 2009 22:41:37 +0000 (22:41 +0000)
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Jan 2009 22:41:37 +0000 (22:41 +0000)
2009-01-05  Dodji Seketeli  <dodji@redhat.com>

PR c++/38472
* typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
Promotion should be done only for integral or enumeration types.

gcc/testsuite/ChangeLog:
2009-01-05  Dodji Seketeli  <dodji@redhat.com>

PR c++/38472
* g++.dg/conversion/usual-arith-conv.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143101 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog

index 7c5ae83..cc4fce1 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-05  Dodji Seketeli  <dodji@redhat.com>
+
+       PR c++/38472
+       * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
+
 2009-01-05  Jason Merrill  <jason@redhat.com>
 
        PR c++/38701
index ed01c51..4be7a25 100644 (file)
@@ -403,7 +403,7 @@ type_after_usual_arithmetic_conversions (tree t1, tree t2)
 
   /* Perform the integral promotions.  We do not promote real types here.  */
   if (INTEGRAL_OR_ENUMERATION_TYPE_P (t1)
-      && INTEGRAL_OR_ENUMERATION_TYPE_P (t1)) 
+      && INTEGRAL_OR_ENUMERATION_TYPE_P (t2))
     {
       t1 = type_promotes_to (t1);
       t2 = type_promotes_to (t2);
index 46d2881..f401ff5 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-05  Dodji Seketeli  <dodji@redhat.com>
+
+       PR c++/38472
+       * g++.dg/conversion/usual-arith-conv.C: New test.
+
 2009-01-05  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
        PR c/34911