mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-24 16:56:02 +08:00
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
This commit is contained in:
parent
6b58915bc3
commit
9cc65f15c4
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user