From: Richard Sandiford Date: Fri, 15 Nov 2013 14:52:36 +0000 (+0000) Subject: c-pretty-print.c (pp_c_character_constant): Remove unnecessary wchar_type and host_in... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9cc65f15c42dd3a8f88764ce893cd2c9004801dd;p=gcc.git c-pretty-print.c (pp_c_character_constant): Remove unnecessary wchar_type and host_integerp checks. gcc/c-family/ * c-pretty-print.c (pp_c_character_constant): Remove unnecessary wchar_type and host_integerp checks. From-SVN: r204847 --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 9deab9e7f58..0c97da83e93 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2013-11-15 Richard Sandiford + + * c-pretty-print.c (pp_c_character_constant): Remove unnecessary + wchar_type and host_integerp checks. + 2013-11-14 Andrew MacLeod * c-common.c: Likewise. diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c index 652c3a89215..54ed5512cd4 100644 --- a/gcc/c-family/c-pretty-print.c +++ b/gcc/c-family/c-pretty-print.c @@ -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); }