diff options
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r-- | gcc/tree-pretty-print.c | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 4b9b453..227999c 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -723,11 +723,41 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, } else if (TREE_CODE (node) == INTEGER_TYPE) { - pp_string (buffer, (TYPE_UNSIGNED (node) - ? "<unnamed-unsigned:" - : "<unnamed-signed:")); - pp_decimal_int (buffer, TYPE_PRECISION (node)); - pp_string (buffer, ">"); + if (TYPE_PRECISION (node) == CHAR_TYPE_SIZE) + pp_string (buffer, (TYPE_UNSIGNED (node) + ? "unsigned char" + : "signed char")); + else if (TYPE_PRECISION (node) == SHORT_TYPE_SIZE) + pp_string (buffer, (TYPE_UNSIGNED (node) + ? "unsigned short" + : "signed short")); + else if (TYPE_PRECISION (node) == INT_TYPE_SIZE) + pp_string (buffer, (TYPE_UNSIGNED (node) + ? "unsigned int" + : "signed int")); + else if (TYPE_PRECISION (node) == LONG_TYPE_SIZE) + pp_string (buffer, (TYPE_UNSIGNED (node) + ? "unsigned long" + : "signed long")); + else if (TYPE_PRECISION (node) == LONG_LONG_TYPE_SIZE) + pp_string (buffer, (TYPE_UNSIGNED (node) + ? "unsigned long long" + : "signed long long")); + else if (TYPE_PRECISION (node) >= CHAR_TYPE_SIZE + && exact_log2 (TYPE_PRECISION (node))) + { + pp_string (buffer, (TYPE_UNSIGNED (node) ? "uint" : "int")); + pp_decimal_int (buffer, TYPE_PRECISION (node)); + pp_string (buffer, "_t"); + } + else + { + pp_string (buffer, (TYPE_UNSIGNED (node) + ? "<unnamed-unsigned:" + : "<unnamed-signed:")); + pp_decimal_int (buffer, TYPE_PRECISION (node)); + pp_string (buffer, ">"); + } } else if (TREE_CODE (node) == COMPLEX_TYPE) { |