OSDN Git Service

(signed_or_unsigned_type): If already right signedness, return.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Oct 1996 22:17:00 +0000 (22:17 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Oct 1996 22:17:00 +0000 (22:17 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13055 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-typeck.c

index 7014040..fa647db 100644 (file)
@@ -776,7 +776,8 @@ signed_or_unsigned_type (unsignedp, type)
      int unsignedp;
      tree type;
 {
-  if (! INTEGRAL_TYPE_P (type))
+  if (! INTEGRAL_TYPE_P (type)
+      || TREE_UNSIGNED (type) == unsignedp)
     return type;
   if (TYPE_PRECISION (type) == TYPE_PRECISION (signed_char_type_node))
     return unsignedp ? unsigned_char_type_node : signed_char_type_node;