c-pretty-print.c (pp_c_character_constant): Remove unnecessary wchar_type and host_in...
authorRichard Sandiford <rdsandiford@googlemail.com>
Fri, 15 Nov 2013 14:52:36 +0000 (14:52 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 15 Nov 2013 14:52:36 +0000 (14:52 +0000)
gcc/c-family/
* c-pretty-print.c (pp_c_character_constant): Remove unnecessary
wchar_type and host_integerp checks.

From-SVN: r204847

gcc/c-family/ChangeLog
gcc/c-family/c-pretty-print.c

index 9deab9e7f58287caa5162731701a34a37e179b0a..0c97da83e93fb3ed5235a4d29aaa5eb11ad96708 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-15  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
+       wchar_type and host_integerp checks.
+
 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
 
        * c-common.c: Likewise.
index 652c3a892154e72653266adc43d473887634ae23..54ed5512cd4292a2cf4300874088bc8085838ae0 100644 (file)
@@ -950,14 +950,8 @@ pp_c_integer_constant (c_pretty_printer *pp, tree i)
 static void
 pp_c_character_constant (c_pretty_printer *pp, tree c)
 {
-  tree type = TREE_TYPE (c);
-  if (type == wchar_type_node)
-    pp_character (pp, 'L');
   pp_quote (pp);
-  if (host_integerp (c, TYPE_UNSIGNED (type)))
-    pp_c_char (pp, tree_low_cst (c, TYPE_UNSIGNED (type)));
-  else
-    pp_scalar (pp, "\\x%x", (unsigned) TREE_INT_CST_LOW (c));
+  pp_c_char (pp, (unsigned) TREE_INT_CST_LOW (c));
   pp_quote (pp);
 }