(signed_or_unsigned_type): If already right signedness, return.
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 28 Oct 1996 22:17:00 +0000 (17:17 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 28 Oct 1996 22:17:00 +0000 (17:17 -0500)
From-SVN: r13055

gcc/c-typeck.c

index 7014040c7ce41d1878d719e3cc23ff503c1d9e45..fa647dbce603e5757bd1d734247cc9348be7cd86 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;