aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-pretty-print.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-family/c-pretty-print.c')
-rw-r--r--gcc/c-family/c-pretty-print.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c
index 2e97d0147c5..9ac8cbaa2a9 100644
--- a/gcc/c-family/c-pretty-print.c
+++ b/gcc/c-family/c-pretty-print.c
@@ -906,6 +906,15 @@ pp_c_string_literal (c_pretty_printer *pp, tree s)
pp_doublequote (pp);
}
+/* Pretty-print a VOID_CST (void_node). */
+
+static void
+pp_c_void_constant (c_pretty_printer *pp)
+{
+ pp_c_type_cast (pp, void_type_node);
+ pp_string (pp, "0");
+}
+
/* Pretty-print an INTEGER literal. */
static void
@@ -1136,6 +1145,10 @@ c_pretty_printer::constant (tree e)
switch (code)
{
+ case VOID_CST:
+ pp_c_void_constant (this);
+ break;
+
case INTEGER_CST:
{
tree type = TREE_TYPE (e);
@@ -1241,6 +1254,7 @@ c_pretty_printer::primary_expression (tree e)
translate_string ("<return-value>");
break;
+ case VOID_CST:
case INTEGER_CST:
case REAL_CST:
case FIXED_CST:
@@ -2131,6 +2145,10 @@ c_pretty_printer::expression (tree e)
{
switch (TREE_CODE (e))
{
+ case VOID_CST:
+ pp_c_void_constant (this);
+ break;
+
case INTEGER_CST:
pp_c_integer_constant (this, e);
break;