OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / c-pretty-print.c
index 43bc1de..8676205 100644 (file)
@@ -1,12 +1,13 @@
 /* Subroutines common to both C and C++ pretty-printers.
 /* Subroutines common to both C and C++ pretty-printers.
-   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   Free Software Foundation, Inc.
    Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
    Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -15,15 +16,15 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "real.h"
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "real.h"
+#include "fixed-value.h"
 #include "c-pretty-print.h"
 #include "c-tree.h"
 #include "tree-iterator.h"
 #include "c-pretty-print.h"
 #include "c-tree.h"
 #include "tree-iterator.h"
@@ -199,8 +200,8 @@ pp_c_space_for_pointer_operator (c_pretty_printer *pp, tree t)
     {
       tree pointee = strip_pointer_operator (TREE_TYPE (t));
       if (TREE_CODE (pointee) != ARRAY_TYPE
     {
       tree pointee = strip_pointer_operator (TREE_TYPE (t));
       if (TREE_CODE (pointee) != ARRAY_TYPE
-          && TREE_CODE (pointee) != FUNCTION_TYPE)
-        pp_c_whitespace (pp);
+         && TREE_CODE (pointee) != FUNCTION_TYPE)
+       pp_c_whitespace (pp);
     }
 }
 
     }
 }
 
@@ -224,7 +225,10 @@ pp_c_space_for_pointer_operator (c_pretty_printer *pp, tree t)
 void
 pp_c_type_qualifier_list (c_pretty_printer *pp, tree t)
 {
 void
 pp_c_type_qualifier_list (c_pretty_printer *pp, tree t)
 {
-   int qualifiers;
+  int qualifiers;
+
+  if (!t || t == error_mark_node)
+    return;
 
   if (!TYPE_P (t))
     t = TREE_TYPE (t);
 
   if (!TYPE_P (t))
     t = TREE_TYPE (t);
@@ -253,11 +257,11 @@ pp_c_pointer (c_pretty_printer *pp, tree t)
       /* It is easier to handle C++ reference types here.  */
     case REFERENCE_TYPE:
       if (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE)
       /* It is easier to handle C++ reference types here.  */
     case REFERENCE_TYPE:
       if (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE)
-        pp_c_pointer (pp, TREE_TYPE (t));
+       pp_c_pointer (pp, TREE_TYPE (t));
       if (TREE_CODE (t) == POINTER_TYPE)
       if (TREE_CODE (t) == POINTER_TYPE)
-        pp_c_star (pp);
+       pp_c_star (pp);
       else
       else
-        pp_c_ampersand (pp);
+       pp_c_ampersand (pp);
       pp_c_type_qualifier_list (pp, t);
       break;
 
       pp_c_type_qualifier_list (pp, t);
       break;
 
@@ -311,14 +315,52 @@ pp_c_type_specifier (c_pretty_printer *pp, tree t)
 
     case VOID_TYPE:
     case BOOLEAN_TYPE:
 
     case VOID_TYPE:
     case BOOLEAN_TYPE:
-    case CHAR_TYPE:
     case INTEGER_TYPE:
     case REAL_TYPE:
     case INTEGER_TYPE:
     case REAL_TYPE:
+    case FIXED_POINT_TYPE:
       if (TYPE_NAME (t))
       if (TYPE_NAME (t))
-        t = TYPE_NAME (t);
+       {
+         t = TYPE_NAME (t);
+         pp_c_type_specifier (pp, t);
+       }
       else
       else
-        t = c_common_type_for_mode (TYPE_MODE (t), TYPE_UNSIGNED (t));
-      pp_c_type_specifier (pp, t);
+       {
+         int prec = TYPE_PRECISION (t);
+         if (ALL_FIXED_POINT_MODE_P (TYPE_MODE (t)))
+           t = c_common_type_for_mode (TYPE_MODE (t), TYPE_SATURATING (t));
+         else
+           t = c_common_type_for_mode (TYPE_MODE (t), TYPE_UNSIGNED (t));
+         if (TYPE_NAME (t))
+           {
+             pp_c_type_specifier (pp, t);
+             if (TYPE_PRECISION (t) != prec)
+               {
+                 pp_string (pp, ":");
+                 pp_decimal_int (pp, prec);
+               }
+           }
+         else
+           {
+             switch (code)
+               {
+               case INTEGER_TYPE:
+                 pp_string (pp, (TYPE_UNSIGNED (t)
+                                 ? "<unnamed-unsigned:"
+                                 : "<unnamed-signed:"));
+                 break;
+               case REAL_TYPE:
+                 pp_string (pp, "<unnamed-float:");
+                 break;
+               case FIXED_POINT_TYPE:
+                 pp_string (pp, "<unnamed-fixed:");
+                 break;
+               default:
+                 gcc_unreachable ();
+               }
+             pp_decimal_int (pp, prec);
+             pp_string (pp, ">");
+           }
+       }
       break;
 
     case TYPE_DECL:
       break;
 
     case TYPE_DECL:
@@ -375,18 +417,18 @@ pp_c_specifier_qualifier_list (c_pretty_printer *pp, tree t)
     case REFERENCE_TYPE:
     case POINTER_TYPE:
       {
     case REFERENCE_TYPE:
     case POINTER_TYPE:
       {
-        /* Get the types-specifier of this type.  */
-        tree pointee = strip_pointer_operator (TREE_TYPE (t));
-        pp_c_specifier_qualifier_list (pp, pointee);
-        if (TREE_CODE (pointee) == ARRAY_TYPE
-            || TREE_CODE (pointee) == FUNCTION_TYPE)
-          {
-            pp_c_whitespace (pp);
-            pp_c_left_paren (pp);
-          }
+       /* Get the types-specifier of this type.  */
+       tree pointee = strip_pointer_operator (TREE_TYPE (t));
+       pp_c_specifier_qualifier_list (pp, pointee);
+       if (TREE_CODE (pointee) == ARRAY_TYPE
+           || TREE_CODE (pointee) == FUNCTION_TYPE)
+         {
+           pp_c_whitespace (pp);
+           pp_c_left_paren (pp);
+         }
        else if (!c_dialect_cxx ())
          pp_c_whitespace (pp);
        else if (!c_dialect_cxx ())
          pp_c_whitespace (pp);
-        pp_ptr_operator (pp, t);
+       pp_ptr_operator (pp, t);
       }
       break;
 
       }
       break;
 
@@ -399,9 +441,9 @@ pp_c_specifier_qualifier_list (c_pretty_printer *pp, tree t)
     case COMPLEX_TYPE:
       pp_c_specifier_qualifier_list (pp, TREE_TYPE (t));
       if (code == COMPLEX_TYPE)
     case COMPLEX_TYPE:
       pp_c_specifier_qualifier_list (pp, TREE_TYPE (t));
       if (code == COMPLEX_TYPE)
-        pp_c_identifier (pp, flag_isoc99 ? "_Complex" : "__complex__");
+       pp_c_identifier (pp, flag_isoc99 ? "_Complex" : "__complex__");
       else if (code == VECTOR_TYPE)
       else if (code == VECTOR_TYPE)
-        pp_c_identifier (pp, "__vector__");
+       pp_c_identifier (pp, "__vector__");
       break;
 
     default:
       break;
 
     default:
@@ -434,17 +476,17 @@ pp_c_parameter_type_list (c_pretty_printer *pp, tree t)
     {
       bool first = true;
       for ( ; parms && parms != void_list_node; parms = TREE_CHAIN (parms))
     {
       bool first = true;
       for ( ; parms && parms != void_list_node; parms = TREE_CHAIN (parms))
-        {
-          if (!first)
-            pp_separate_with (pp, ',');
-          first = false;
-          pp_declaration_specifiers
-            (pp, want_parm_decl ? parms : TREE_VALUE (parms));
-          if (want_parm_decl)
-            pp_declarator (pp, parms);
-          else
-            pp_abstract_declarator (pp, TREE_VALUE (parms));
-        }
+       {
+         if (!first)
+           pp_separate_with (pp, ',');
+         first = false;
+         pp_declaration_specifiers
+           (pp, want_parm_decl ? parms : TREE_VALUE (parms));
+         if (want_parm_decl)
+           pp_declarator (pp, parms);
+         else
+           pp_abstract_declarator (pp, TREE_VALUE (parms));
+       }
     }
   pp_c_right_paren (pp);
 }
     }
   pp_c_right_paren (pp);
 }
@@ -459,8 +501,8 @@ pp_c_abstract_declarator (c_pretty_printer *pp, tree t)
   if (TREE_CODE (t) == POINTER_TYPE)
     {
       if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE
   if (TREE_CODE (t) == POINTER_TYPE)
     {
       if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE
-          || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE)
-        pp_c_right_paren (pp);
+         || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE)
+       pp_c_right_paren (pp);
       t = TREE_TYPE (t);
     }
 
       t = TREE_TYPE (t);
     }
 
@@ -490,7 +532,16 @@ pp_c_direct_abstract_declarator (c_pretty_printer *pp, tree t)
     case ARRAY_TYPE:
       pp_c_left_bracket (pp);
       if (TYPE_DOMAIN (t) && TYPE_MAX_VALUE (TYPE_DOMAIN (t)))
     case ARRAY_TYPE:
       pp_c_left_bracket (pp);
       if (TYPE_DOMAIN (t) && TYPE_MAX_VALUE (TYPE_DOMAIN (t)))
-        pp_expression (pp, TYPE_MAX_VALUE (TYPE_DOMAIN (t)));
+       {
+         tree maxval = TYPE_MAX_VALUE (TYPE_DOMAIN (t));
+         tree type = TREE_TYPE (maxval);
+
+         if (host_integerp (maxval, 0))
+           pp_wide_integer (pp, tree_low_cst (maxval, 0) + 1);
+         else
+           pp_expression (pp, fold_build2 (PLUS_EXPR, type, maxval,
+                                           build_int_cst (type, 1)));
+       }
       pp_c_right_bracket (pp);
       pp_direct_abstract_declarator (pp, TREE_TYPE (t));
       break;
       pp_c_right_bracket (pp);
       pp_direct_abstract_declarator (pp, TREE_TYPE (t));
       break;
@@ -500,6 +551,7 @@ pp_c_direct_abstract_declarator (c_pretty_printer *pp, tree t)
     case BOOLEAN_TYPE:
     case INTEGER_TYPE:
     case REAL_TYPE:
     case BOOLEAN_TYPE:
     case INTEGER_TYPE:
     case REAL_TYPE:
+    case FIXED_POINT_TYPE:
     case ENUMERAL_TYPE:
     case RECORD_TYPE:
     case UNION_TYPE:
     case ENUMERAL_TYPE:
     case RECORD_TYPE:
     case UNION_TYPE:
@@ -539,9 +591,9 @@ pp_c_storage_class_specifier (c_pretty_printer *pp, tree t)
   else if (DECL_P (t))
     {
       if (DECL_REGISTER (t))
   else if (DECL_P (t))
     {
       if (DECL_REGISTER (t))
-        pp_c_identifier (pp, "register");
+       pp_c_identifier (pp, "register");
       else if (TREE_STATIC (t) && TREE_CODE (t) == VAR_DECL)
       else if (TREE_STATIC (t) && TREE_CODE (t) == VAR_DECL)
-        pp_c_identifier (pp, "static");
+       pp_c_identifier (pp, "static");
     }
 }
 
     }
 }
 
@@ -607,16 +659,17 @@ pp_c_direct_declarator (c_pretty_printer *pp, tree t)
       pp_c_space_for_pointer_operator (pp, TREE_TYPE (TREE_TYPE (t)));
       pp_c_tree_decl_identifier (pp, t);
       if (pp_c_base (pp)->flags & pp_c_flag_abstract)
       pp_c_space_for_pointer_operator (pp, TREE_TYPE (TREE_TYPE (t)));
       pp_c_tree_decl_identifier (pp, t);
       if (pp_c_base (pp)->flags & pp_c_flag_abstract)
-        pp_abstract_declarator (pp, TREE_TYPE (t));
+       pp_abstract_declarator (pp, TREE_TYPE (t));
       else
       else
-        {
-          pp_parameter_list (pp, t);
-          pp_abstract_declarator (pp, TREE_TYPE (TREE_TYPE (t)));
-        }
+       {
+         pp_parameter_list (pp, t);
+         pp_abstract_declarator (pp, TREE_TYPE (TREE_TYPE (t)));
+       }
       break;
 
     case INTEGER_TYPE:
     case REAL_TYPE:
       break;
 
     case INTEGER_TYPE:
     case REAL_TYPE:
+    case FIXED_POINT_TYPE:
     case ENUMERAL_TYPE:
     case UNION_TYPE:
     case RECORD_TYPE:
     case ENUMERAL_TYPE:
     case UNION_TYPE:
     case RECORD_TYPE:
@@ -639,6 +692,7 @@ pp_c_declarator (c_pretty_printer *pp, tree t)
     {
     case INTEGER_TYPE:
     case REAL_TYPE:
     {
     case INTEGER_TYPE:
     case REAL_TYPE:
+    case FIXED_POINT_TYPE:
     case ENUMERAL_TYPE:
     case UNION_TYPE:
     case RECORD_TYPE:
     case ENUMERAL_TYPE:
     case UNION_TYPE:
     case RECORD_TYPE:
@@ -686,7 +740,7 @@ pp_c_attributes (c_pretty_printer *pp, tree attributes)
     {
       pp_tree_identifier (pp, TREE_PURPOSE (attributes));
       if (TREE_VALUE (attributes))
     {
       pp_tree_identifier (pp, TREE_PURPOSE (attributes));
       if (TREE_VALUE (attributes))
-        pp_c_call_argument_list (pp, TREE_VALUE (attributes));
+       pp_c_call_argument_list (pp, TREE_VALUE (attributes));
 
       if (TREE_CHAIN (attributes))
        pp_separate_with (pp, ',');
 
       if (TREE_CHAIN (attributes))
        pp_separate_with (pp, ',');
@@ -712,50 +766,37 @@ pp_c_function_definition (c_pretty_printer *pp, tree t)
 \f
 /* Expressions.  */
 
 \f
 /* Expressions.  */
 
-/* Print out a c-char.  */
+/* Print out a c-char.  This is called solely for characters which are
+   in the *target* execution character set.  We ought to convert them
+   back to the *host* execution character set before printing, but we
+   have no way to do this at present.  A decent compromise is to print
+   all characters as if they were in the host execution character set,
+   and not attempt to recover any named escape characters, but render
+   all unprintables as octal escapes.  If the host and target character
+   sets are the same, this produces relatively readable output.  If they
+   are not the same, strings may appear as gibberish, but that's okay
+   (in fact, it may well be what the reader wants, e.g. if they are looking
+   to see if conversion to the target character set happened correctly).
+
+   A special case: we need to prefix \, ", and ' with backslashes.  It is
+   correct to do so for the *host*'s \, ", and ', because the rest of the
+   file appears in the host character set.  */
 
 static void
 pp_c_char (c_pretty_printer *pp, int c)
 {
 
 static void
 pp_c_char (c_pretty_printer *pp, int c)
 {
-  switch (c)
+  if (ISPRINT (c))
     {
     {
-    case TARGET_NEWLINE:
-      pp_string (pp, "\\n");
-      break;
-    case TARGET_TAB:
-      pp_string (pp, "\\t");
-      break;
-    case TARGET_VT:
-      pp_string (pp, "\\v");
-      break;
-    case TARGET_BS:
-      pp_string (pp, "\\b");
-      break;
-    case TARGET_CR:
-      pp_string (pp, "\\r");
-      break;
-    case TARGET_FF:
-      pp_string (pp, "\\f");
-      break;
-    case TARGET_BELL:
-      pp_string (pp, "\\a");
-      break;
-    case '\\':
-      pp_string (pp, "\\\\");
-      break;
-    case '\'':
-      pp_string (pp, "\\'");
-      break;
-    case '\"':
-      pp_string (pp, "\\\"");
-      break;
-    default:
-      if (ISPRINT (c))
-       pp_character (pp, c);
-      else
-       pp_scalar (pp, "\\%03o", (unsigned) c);
-      break;
+      switch (c)
+       {
+       case '\\': pp_string (pp, "\\\\"); break;
+       case '\'': pp_string (pp, "\\\'"); break;
+       case '\"': pp_string (pp, "\\\""); break;
+       default:   pp_character (pp, c);
+       }
     }
     }
+  else
+    pp_scalar (pp, "\\%03o", (unsigned) c);
 }
 
 /* Print out a STRING literal.  */
 }
 
 /* Print out a STRING literal.  */
@@ -783,17 +824,16 @@ pp_c_integer_constant (c_pretty_printer *pp, tree i)
     pp_wide_integer (pp, TREE_INT_CST_LOW (i));
   else
     {
     pp_wide_integer (pp, TREE_INT_CST_LOW (i));
   else
     {
+      unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (i);
+      HOST_WIDE_INT high = TREE_INT_CST_HIGH (i);
       if (tree_int_cst_sgn (i) < 0)
       if (tree_int_cst_sgn (i) < 0)
-        {
-          pp_c_char (pp, '-');
-          i = build_int_cst_wide (NULL_TREE,
-                                 -TREE_INT_CST_LOW (i),
-                                 ~TREE_INT_CST_HIGH (i)
-                                 + !TREE_INT_CST_LOW (i));
-        }
-      sprintf (pp_buffer (pp)->digit_buffer,
-               HOST_WIDE_INT_PRINT_DOUBLE_HEX,
-               TREE_INT_CST_HIGH (i), TREE_INT_CST_LOW (i));
+       {
+         pp_character (pp, '-');
+         high = ~high + !low;
+         low = -low;
+       }
+      sprintf (pp_buffer (pp)->digit_buffer, HOST_WIDE_INT_PRINT_DOUBLE_HEX, 
+              (unsigned HOST_WIDE_INT) high, (unsigned HOST_WIDE_INT) low);
       pp_string (pp, pp_buffer (pp)->digit_buffer);
     }
   if (TYPE_UNSIGNED (type))
       pp_string (pp, pp_buffer (pp)->digit_buffer);
     }
   if (TYPE_UNSIGNED (type))
@@ -801,7 +841,7 @@ pp_c_integer_constant (c_pretty_printer *pp, tree i)
   if (type == long_integer_type_node || type == long_unsigned_type_node)
     pp_character (pp, 'l');
   else if (type == long_long_integer_type_node
   if (type == long_integer_type_node || type == long_unsigned_type_node)
     pp_character (pp, 'l');
   else if (type == long_long_integer_type_node
-           || type == long_long_unsigned_type_node)
+          || type == long_long_unsigned_type_node)
     pp_string (pp, "ll");
 }
 
     pp_string (pp, "ll");
 }
 
@@ -892,6 +932,22 @@ pp_c_floating_constant (c_pretty_printer *pp, tree r)
     pp_character (pp, 'f');
   else if (TREE_TYPE (r) == long_double_type_node)
     pp_character (pp, 'l');
     pp_character (pp, 'f');
   else if (TREE_TYPE (r) == long_double_type_node)
     pp_character (pp, 'l');
+  else if (TREE_TYPE (r) == dfloat128_type_node)
+    pp_string (pp, "dl");
+  else if (TREE_TYPE (r) == dfloat64_type_node)
+    pp_string (pp, "dd");
+  else if (TREE_TYPE (r) == dfloat32_type_node)
+    pp_string (pp, "df");
+}
+
+/* Print out a FIXED value as a decimal-floating-constant.  */
+
+static void
+pp_c_fixed_constant (c_pretty_printer *pp, tree r)
+{
+  fixed_to_decimal (pp_buffer (pp)->digit_buffer, &TREE_FIXED_CST (r),
+                  sizeof (pp_buffer (pp)->digit_buffer));
+  pp_string (pp, pp_buffer(pp)->digit_buffer);
 }
 
 /* Pretty-print a compound literal expression.  GNU extensions include
 }
 
 /* Pretty-print a compound literal expression.  GNU extensions include
@@ -919,9 +975,50 @@ pp_c_compound_literal (c_pretty_printer *pp, tree e)
     }
 }
 
     }
 }
 
+/* Pretty-print a COMPLEX_EXPR expression.  */
+
+static void
+pp_c_complex_expr (c_pretty_printer *pp, tree e)
+{
+  /* Handle a few common special cases, otherwise fallback
+     to printing it as compound literal.  */
+  tree type = TREE_TYPE (e);
+  tree realexpr = TREE_OPERAND (e, 0);
+  tree imagexpr = TREE_OPERAND (e, 1);
+
+  /* Cast of an COMPLEX_TYPE expression to a different COMPLEX_TYPE.  */
+  if (TREE_CODE (realexpr) == NOP_EXPR
+      && TREE_CODE (imagexpr) == NOP_EXPR
+      && TREE_TYPE (realexpr) == TREE_TYPE (type)
+      && TREE_TYPE (imagexpr) == TREE_TYPE (type)
+      && TREE_CODE (TREE_OPERAND (realexpr, 0)) == REALPART_EXPR
+      && TREE_CODE (TREE_OPERAND (imagexpr, 0)) == IMAGPART_EXPR
+      && TREE_OPERAND (TREE_OPERAND (realexpr, 0), 0)
+        == TREE_OPERAND (TREE_OPERAND (imagexpr, 0), 0))
+    {
+      pp_c_type_cast (pp, type);
+      pp_expression (pp, TREE_OPERAND (TREE_OPERAND (realexpr, 0), 0));
+      return;
+    }
+
+  /* Cast of an scalar expression to COMPLEX_TYPE.  */
+  if ((integer_zerop (imagexpr) || real_zerop (imagexpr))
+      && TREE_TYPE (realexpr) == TREE_TYPE (type))
+    {
+      pp_c_type_cast (pp, type);
+      if (TREE_CODE (realexpr) == NOP_EXPR)
+       realexpr = TREE_OPERAND (realexpr, 0);
+      pp_expression (pp, realexpr);
+      return;
+    }
+
+  pp_c_compound_literal (pp, e);
+}
+
 /* constant:
       integer-constant
       floating-constant
 /* constant:
       integer-constant
       floating-constant
+      fixed-point-constant
       enumeration-constant
       character-constant   */
 
       enumeration-constant
       character-constant   */
 
@@ -934,16 +1031,16 @@ pp_c_constant (c_pretty_printer *pp, tree e)
     {
     case INTEGER_CST:
       {
     {
     case INTEGER_CST:
       {
-        tree type = TREE_TYPE (e);
-        if (type == boolean_type_node)
-          pp_c_bool_constant (pp, e);
-        else if (type == char_type_node)
-          pp_c_character_constant (pp, e);
-        else if (TREE_CODE (type) == ENUMERAL_TYPE
-                 && pp_c_enumeration_constant (pp, e))
-          ;
-        else
-          pp_c_integer_constant (pp, e);
+       tree type = TREE_TYPE (e);
+       if (type == boolean_type_node)
+         pp_c_bool_constant (pp, e);
+       else if (type == char_type_node)
+         pp_c_character_constant (pp, e);
+       else if (TREE_CODE (type) == ENUMERAL_TYPE
+                && pp_c_enumeration_constant (pp, e))
+         ;
+       else
+         pp_c_integer_constant (pp, e);
       }
       break;
 
       }
       break;
 
@@ -951,10 +1048,21 @@ pp_c_constant (c_pretty_printer *pp, tree e)
       pp_c_floating_constant (pp, e);
       break;
 
       pp_c_floating_constant (pp, e);
       break;
 
+    case FIXED_CST:
+      pp_c_fixed_constant (pp, e);
+      break;
+
     case STRING_CST:
       pp_c_string_literal (pp, e);
       break;
 
     case STRING_CST:
       pp_c_string_literal (pp, e);
       break;
 
+    case COMPLEX_CST:
+      /* Sometimes, we are confused and we think a complex literal
+         is a constant.  Such thing is a compound literal which
+         grammatically belongs to postfix-expr production.  */
+      pp_c_compound_literal (pp, e);
+      break;
+
     default:
       pp_unsupported_tree (pp, e);
       break;
     default:
       pp_unsupported_tree (pp, e);
       break;
@@ -1006,6 +1114,7 @@ pp_c_primary_expression (c_pretty_printer *pp, tree e)
 
     case INTEGER_CST:
     case REAL_CST:
 
     case INTEGER_CST:
     case REAL_CST:
+    case FIXED_CST:
     case STRING_CST:
       pp_c_constant (pp, e);
       break;
     case STRING_CST:
       pp_c_constant (pp, e);
       break;
@@ -1026,14 +1135,8 @@ pp_c_primary_expression (c_pretty_printer *pp, tree e)
       pp_c_right_paren (pp);
       break;
 
       pp_c_right_paren (pp);
       break;
 
-    case STMT_EXPR:
-      pp_c_left_paren (pp);
-      pp_statement (pp, STMT_EXPR_STMT (e));
-      pp_c_right_paren (pp);
-      break;
-
     default:
     default:
-      /* FIXME:  Make sure we won't get into an infinie loop.  */
+      /* FIXME:  Make sure we won't get into an infinite loop.  */
       pp_c_left_paren (pp);
       pp_expression (pp, e);
       pp_c_right_paren (pp);
       pp_c_left_paren (pp);
       pp_expression (pp, e);
       pp_c_right_paren (pp);
@@ -1070,22 +1173,22 @@ pp_c_init_declarator (c_pretty_printer *pp, tree t)
     {
       tree init = DECL_INITIAL (t);
       /* This C++ bit is handled here because it is easier to do so.
     {
       tree init = DECL_INITIAL (t);
       /* This C++ bit is handled here because it is easier to do so.
-         In templates, the C++ parser builds a TREE_LIST for a
-         direct-initialization; the TREE_PURPOSE is the variable to
-         initialize and the TREE_VALUE is the initializer.  */
+        In templates, the C++ parser builds a TREE_LIST for a
+        direct-initialization; the TREE_PURPOSE is the variable to
+        initialize and the TREE_VALUE is the initializer.  */
       if (TREE_CODE (init) == TREE_LIST)
       if (TREE_CODE (init) == TREE_LIST)
-        {
-          pp_c_left_paren (pp);
-          pp_expression (pp, TREE_VALUE (init));
-          pp_right_paren (pp);
-        }
+       {
+         pp_c_left_paren (pp);
+         pp_expression (pp, TREE_VALUE (init));
+         pp_right_paren (pp);
+       }
       else
       else
-        {
-          pp_space (pp);
-          pp_equal (pp);
-          pp_space (pp);
-          pp_c_initializer (pp, init);
-        }
+       {
+         pp_space (pp);
+         pp_equal (pp);
+         pp_space (pp);
+         pp_c_initializer (pp, init);
+       }
     }
 }
 
     }
 }
 
@@ -1110,50 +1213,52 @@ pp_c_initializer_list (c_pretty_printer *pp, tree e)
   tree type = TREE_TYPE (e);
   const enum tree_code code = TREE_CODE (type);
 
   tree type = TREE_TYPE (e);
   const enum tree_code code = TREE_CODE (type);
 
+  if (TREE_CODE (e) == CONSTRUCTOR)
+    {
+      pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
+      return;
+    }
+
   switch (code)
     {
     case RECORD_TYPE:
     case UNION_TYPE:
     case ARRAY_TYPE:
       {
   switch (code)
     {
     case RECORD_TYPE:
     case UNION_TYPE:
     case ARRAY_TYPE:
       {
-        tree init = TREE_OPERAND (e, 0);
-        for (; init != NULL_TREE; init = TREE_CHAIN (init))
-          {
-            if (code == RECORD_TYPE || code == UNION_TYPE)
-              {
-                pp_c_dot (pp);
-                pp_c_primary_expression (pp, TREE_PURPOSE (init));
-              }
-            else
-              {
-                pp_c_left_bracket (pp);
-                if (TREE_PURPOSE (init))
-                  pp_c_constant (pp, TREE_PURPOSE (init));
-                pp_c_right_bracket (pp);
-              }
-            pp_c_whitespace (pp);
-            pp_equal (pp);
-            pp_c_whitespace (pp);
-            pp_initializer (pp, TREE_VALUE (init));
-            if (TREE_CHAIN (init))
-              pp_separate_with (pp, ',');
-          }
+       tree init = TREE_OPERAND (e, 0);
+       for (; init != NULL_TREE; init = TREE_CHAIN (init))
+         {
+           if (code == RECORD_TYPE || code == UNION_TYPE)
+             {
+               pp_c_dot (pp);
+               pp_c_primary_expression (pp, TREE_PURPOSE (init));
+             }
+           else
+             {
+               pp_c_left_bracket (pp);
+               if (TREE_PURPOSE (init))
+                 pp_c_constant (pp, TREE_PURPOSE (init));
+               pp_c_right_bracket (pp);
+             }
+           pp_c_whitespace (pp);
+           pp_equal (pp);
+           pp_c_whitespace (pp);
+           pp_initializer (pp, TREE_VALUE (init));
+           if (TREE_CHAIN (init))
+             pp_separate_with (pp, ',');
+         }
       }
       return;
 
     case VECTOR_TYPE:
       if (TREE_CODE (e) == VECTOR_CST)
       }
       return;
 
     case VECTOR_TYPE:
       if (TREE_CODE (e) == VECTOR_CST)
-        pp_c_expression_list (pp, TREE_VECTOR_CST_ELTS (e));
-      else if (TREE_CODE (e) == CONSTRUCTOR)
-        pp_c_expression_list (pp, CONSTRUCTOR_ELTS (e));
+       pp_c_expression_list (pp, TREE_VECTOR_CST_ELTS (e));
       else
       else
-        break;
+       break;
       return;
 
     case COMPLEX_TYPE:
       return;
 
     case COMPLEX_TYPE:
-      if (TREE_CODE (e) == CONSTRUCTOR)
-       pp_c_expression_list (pp, CONSTRUCTOR_ELTS (e));
-      else if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
+      if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
        {
          const bool cst = TREE_CODE (e) == COMPLEX_CST;
          pp_expression (pp, cst ? TREE_REALPART (e) : TREE_OPERAND (e, 0));
        {
          const bool cst = TREE_CODE (e) == COMPLEX_CST;
          pp_expression (pp, cst ? TREE_REALPART (e) : TREE_OPERAND (e, 0));
@@ -1236,11 +1341,6 @@ pp_c_postfix_expression (c_pretty_printer *pp, tree e)
       pp_identifier (pp, code == POSTINCREMENT_EXPR ? "++" : "--");
       break;
 
       pp_identifier (pp, code == POSTINCREMENT_EXPR ? "++" : "--");
       break;
 
-    case ARROW_EXPR:
-      pp_postfix_expression (pp, TREE_OPERAND (e, 0));
-      pp_c_arrow (pp);
-      break;
-
     case ARRAY_REF:
       pp_postfix_expression (pp, TREE_OPERAND (e, 0));
       pp_c_left_bracket (pp);
     case ARRAY_REF:
       pp_postfix_expression (pp, TREE_OPERAND (e, 0));
       pp_c_left_bracket (pp);
@@ -1249,9 +1349,20 @@ pp_c_postfix_expression (c_pretty_printer *pp, tree e)
       break;
 
     case CALL_EXPR:
       break;
 
     case CALL_EXPR:
-      pp_postfix_expression (pp, TREE_OPERAND (e, 0));
-      pp_c_call_argument_list (pp, TREE_OPERAND (e, 1));
-      break;
+      {
+       call_expr_arg_iterator iter;
+       tree arg;
+       pp_postfix_expression (pp, CALL_EXPR_FN (e));
+       pp_c_left_paren (pp);
+       FOR_EACH_CALL_EXPR_ARG (arg, iter, e)
+         {
+           pp_expression (pp, arg);
+           if (more_call_expr_args_p (&iter))
+             pp_separate_with (pp, ',');
+         }
+       pp_c_right_paren (pp);
+       break;
+      }
 
     case UNORDERED_EXPR:
       pp_c_identifier (pp, flag_isoc99
 
     case UNORDERED_EXPR:
       pp_c_identifier (pp, flag_isoc99
@@ -1333,12 +1444,45 @@ pp_c_postfix_expression (c_pretty_printer *pp, tree e)
       }
       break;
 
       }
       break;
 
+    case BIT_FIELD_REF:
+      {
+       tree type = TREE_TYPE (e);
+
+       type = signed_or_unsigned_type_for (TYPE_UNSIGNED (type), type);
+       if (type
+           && tree_int_cst_equal (TYPE_SIZE (type), TREE_OPERAND (e, 1)))
+         {
+           HOST_WIDE_INT bitpos = tree_low_cst (TREE_OPERAND (e, 2), 0);
+           HOST_WIDE_INT size = tree_low_cst (TYPE_SIZE (type), 0);
+           if ((bitpos % size) == 0)
+             {
+               pp_c_left_paren (pp);
+               pp_c_left_paren (pp);
+               pp_type_id (pp, type);
+               pp_c_star (pp);
+               pp_c_right_paren (pp);
+               pp_c_ampersand (pp);
+               pp_expression (pp, TREE_OPERAND (e, 0));
+               pp_c_right_paren (pp);
+               pp_c_left_bracket (pp);
+               pp_wide_integer (pp, bitpos / size);
+               pp_c_right_bracket (pp);
+               break;
+             }
+         }
+       pp_unsupported_tree (pp, e);
+      }
+      break;
+
     case COMPLEX_CST:
     case VECTOR_CST:
     case COMPLEX_CST:
     case VECTOR_CST:
-    case COMPLEX_EXPR:
       pp_c_compound_literal (pp, e);
       break;
 
       pp_c_compound_literal (pp, e);
       break;
 
+    case COMPLEX_EXPR:
+      pp_c_complex_expr (pp, e);
+      break;
+
     case COMPOUND_LITERAL_EXPR:
       e = DECL_INITIAL (COMPOUND_LITERAL_EXPR_DECL (e));
       /* Fall through.  */
     case COMPOUND_LITERAL_EXPR:
       e = DECL_INITIAL (COMPOUND_LITERAL_EXPR_DECL (e));
       /* Fall through.  */
@@ -1357,10 +1501,10 @@ pp_c_postfix_expression (c_pretty_printer *pp, tree e)
 
     case ADDR_EXPR:
       if (TREE_CODE (TREE_OPERAND (e, 0)) == FUNCTION_DECL)
 
     case ADDR_EXPR:
       if (TREE_CODE (TREE_OPERAND (e, 0)) == FUNCTION_DECL)
-        {
-          pp_c_id_expression (pp, TREE_OPERAND (e, 0));
-          break;
-        }
+       {
+         pp_c_id_expression (pp, TREE_OPERAND (e, 0));
+         break;
+       }
       /* else fall through.  */
 
     default:
       /* else fall through.  */
 
     default:
@@ -1382,7 +1526,24 @@ pp_c_expression_list (c_pretty_printer *pp, tree e)
     }
 }
 
     }
 }
 
-/* Print out an expression-list in parens, as in a function call.  */
+/* Print out V, which contains the elements of a constructor.  */
+
+void
+pp_c_constructor_elts (c_pretty_printer *pp, VEC(constructor_elt,gc) *v)
+{
+  unsigned HOST_WIDE_INT ix;
+  tree value;
+
+  FOR_EACH_CONSTRUCTOR_VALUE (v, ix, value)
+    {
+      pp_expression (pp, value);
+      if (ix != VEC_length (constructor_elt, v) - 1)
+       pp_separate_with (pp, ',');
+    }
+}
+
+/* Print out an expression-list in parens, as if it were the argument
+   list to a function.  */
 
 void
 pp_c_call_argument_list (c_pretty_printer *pp, tree t)
 
 void
 pp_c_call_argument_list (c_pretty_printer *pp, tree t)
@@ -1443,16 +1604,6 @@ pp_c_unary_expression (c_pretty_printer *pp, tree e)
       pp_c_cast_expression (pp, TREE_OPERAND (e, 0));
       break;
 
       pp_c_cast_expression (pp, TREE_OPERAND (e, 0));
       break;
 
-    case SIZEOF_EXPR:
-    case ALIGNOF_EXPR:
-      pp_c_identifier (pp, code == SIZEOF_EXPR ? "sizeof" : "__alignof__");
-      pp_c_whitespace (pp);
-      if (TYPE_P (TREE_OPERAND (e, 0)))
-        pp_c_type_cast (pp, TREE_OPERAND (e, 0));
-      else
-       pp_unary_expression (pp, TREE_OPERAND (e, 0));
-      break;
-
     case REALPART_EXPR:
     case IMAGPART_EXPR:
       pp_c_identifier (pp, code == REALPART_EXPR ? "__real__" : "__imag__");
     case REALPART_EXPR:
     case IMAGPART_EXPR:
       pp_c_identifier (pp, code == REALPART_EXPR ? "__real__" : "__imag__");
@@ -1477,7 +1628,8 @@ pp_c_cast_expression (c_pretty_printer *pp, tree e)
     {
     case FLOAT_EXPR:
     case FIX_TRUNC_EXPR:
     {
     case FLOAT_EXPR:
     case FIX_TRUNC_EXPR:
-    case CONVERT_EXPR:
+    CASE_CONVERT:
+    case VIEW_CONVERT_EXPR:
       pp_c_type_cast (pp, TREE_TYPE (e));
       pp_c_cast_expression (pp, TREE_OPERAND (e, 0));
       break;
       pp_c_type_cast (pp, TREE_TYPE (e));
       pp_c_cast_expression (pp, TREE_OPERAND (e, 0));
       break;
@@ -1531,11 +1683,12 @@ pp_c_additive_expression (c_pretty_printer *pp, tree e)
   enum tree_code code = TREE_CODE (e);
   switch (code)
     {
   enum tree_code code = TREE_CODE (e);
   switch (code)
     {
+    case POINTER_PLUS_EXPR:
     case PLUS_EXPR:
     case MINUS_EXPR:
       pp_c_additive_expression (pp, TREE_OPERAND (e, 0));
       pp_c_whitespace (pp);
     case PLUS_EXPR:
     case MINUS_EXPR:
       pp_c_additive_expression (pp, TREE_OPERAND (e, 0));
       pp_c_whitespace (pp);
-      if (code == PLUS_EXPR)
+      if (code == PLUS_EXPR || code == POINTER_PLUS_EXPR)
        pp_plus (pp);
       else
        pp_minus (pp);
        pp_plus (pp);
       else
        pp_minus (pp);
@@ -1663,10 +1816,14 @@ pp_c_and_expression (c_pretty_printer *pp, tree e)
 static void
 pp_c_exclusive_or_expression (c_pretty_printer *pp, tree e)
 {
 static void
 pp_c_exclusive_or_expression (c_pretty_printer *pp, tree e)
 {
-  if (TREE_CODE (e) == BIT_XOR_EXPR)
+  if (TREE_CODE (e) == BIT_XOR_EXPR
+      || TREE_CODE (e) == TRUTH_XOR_EXPR)
     {
       pp_c_exclusive_or_expression (pp, TREE_OPERAND (e, 0));
     {
       pp_c_exclusive_or_expression (pp, TREE_OPERAND (e, 0));
-      pp_c_maybe_whitespace (pp);
+      if (TREE_CODE (e) == BIT_XOR_EXPR)
+       pp_c_maybe_whitespace (pp);
+      else
+       pp_c_whitespace (pp);
       pp_carret (pp);
       pp_c_whitespace (pp);
       pp_c_and_expression (pp, TREE_OPERAND (e, 1));
       pp_carret (pp);
       pp_c_whitespace (pp);
       pp_c_and_expression (pp, TREE_OPERAND (e, 1));
@@ -1701,7 +1858,8 @@ pp_c_inclusive_or_expression (c_pretty_printer *pp, tree e)
 static void
 pp_c_logical_and_expression (c_pretty_printer *pp, tree e)
 {
 static void
 pp_c_logical_and_expression (c_pretty_printer *pp, tree e)
 {
-  if (TREE_CODE (e) == TRUTH_ANDIF_EXPR)
+  if (TREE_CODE (e) == TRUTH_ANDIF_EXPR
+      || TREE_CODE (e) == TRUTH_AND_EXPR)
     {
       pp_c_logical_and_expression (pp, TREE_OPERAND (e, 0));
       pp_c_whitespace (pp);
     {
       pp_c_logical_and_expression (pp, TREE_OPERAND (e, 0));
       pp_c_whitespace (pp);
@@ -1720,7 +1878,8 @@ pp_c_logical_and_expression (c_pretty_printer *pp, tree e)
 void
 pp_c_logical_or_expression (c_pretty_printer *pp, tree e)
 {
 void
 pp_c_logical_or_expression (c_pretty_printer *pp, tree e)
 {
-  if (TREE_CODE (e) == TRUTH_ORIF_EXPR)
+  if (TREE_CODE (e) == TRUTH_ORIF_EXPR
+      || TREE_CODE (e) == TRUTH_OR_EXPR)
     {
       pp_c_logical_or_expression (pp, TREE_OPERAND (e, 0));
       pp_c_whitespace (pp);
     {
       pp_c_logical_or_expression (pp, TREE_OPERAND (e, 0));
       pp_c_whitespace (pp);
@@ -1766,7 +1925,8 @@ pp_c_conditional_expression (c_pretty_printer *pp, tree e)
 static void
 pp_c_assignment_expression (c_pretty_printer *pp, tree e)
 {
 static void
 pp_c_assignment_expression (c_pretty_printer *pp, tree e)
 {
-  if (TREE_CODE (e) == MODIFY_EXPR || TREE_CODE (e) == INIT_EXPR)
+  if (TREE_CODE (e) == MODIFY_EXPR 
+      || TREE_CODE (e) == INIT_EXPR)
     {
       pp_c_unary_expression (pp, TREE_OPERAND (e, 0));
       pp_c_whitespace (pp);
     {
       pp_c_unary_expression (pp, TREE_OPERAND (e, 0));
       pp_c_whitespace (pp);
@@ -1801,6 +1961,10 @@ pp_c_expression (c_pretty_printer *pp, tree e)
       pp_c_floating_constant (pp, e);
       break;
 
       pp_c_floating_constant (pp, e);
       break;
 
+    case FIXED_CST:
+      pp_c_fixed_constant (pp, e);
+      break;
+
     case STRING_CST:
       pp_c_string_literal (pp, e);
       break;
     case STRING_CST:
       pp_c_string_literal (pp, e);
       break;
@@ -1814,16 +1978,15 @@ pp_c_expression (c_pretty_printer *pp, tree e)
     case FIELD_DECL:
     case LABEL_DECL:
     case ERROR_MARK:
     case FIELD_DECL:
     case LABEL_DECL:
     case ERROR_MARK:
-    case STMT_EXPR:
       pp_primary_expression (pp, e);
       break;
 
     case POSTINCREMENT_EXPR:
     case POSTDECREMENT_EXPR:
       pp_primary_expression (pp, e);
       break;
 
     case POSTINCREMENT_EXPR:
     case POSTDECREMENT_EXPR:
-    case ARROW_EXPR:
     case ARRAY_REF:
     case CALL_EXPR:
     case COMPONENT_REF:
     case ARRAY_REF:
     case CALL_EXPR:
     case COMPONENT_REF:
+    case BIT_FIELD_REF:
     case COMPLEX_CST:
     case COMPLEX_EXPR:
     case VECTOR_CST:
     case COMPLEX_CST:
     case COMPLEX_EXPR:
     case VECTOR_CST:
@@ -1850,8 +2013,6 @@ pp_c_expression (c_pretty_printer *pp, tree e)
     case TRUTH_NOT_EXPR:
     case PREINCREMENT_EXPR:
     case PREDECREMENT_EXPR:
     case TRUTH_NOT_EXPR:
     case PREINCREMENT_EXPR:
     case PREDECREMENT_EXPR:
-    case SIZEOF_EXPR:
-    case ALIGNOF_EXPR:
     case REALPART_EXPR:
     case IMAGPART_EXPR:
       pp_c_unary_expression (pp, e);
     case REALPART_EXPR:
     case IMAGPART_EXPR:
       pp_c_unary_expression (pp, e);
@@ -1859,7 +2020,8 @@ pp_c_expression (c_pretty_printer *pp, tree e)
 
     case FLOAT_EXPR:
     case FIX_TRUNC_EXPR:
 
     case FLOAT_EXPR:
     case FIX_TRUNC_EXPR:
-    case CONVERT_EXPR:
+    CASE_CONVERT:
+    case VIEW_CONVERT_EXPR:
       pp_c_cast_expression (pp, e);
       break;
 
       pp_c_cast_expression (pp, e);
       break;
 
@@ -1886,6 +2048,7 @@ pp_c_expression (c_pretty_printer *pp, tree e)
       break;
 
     case BIT_XOR_EXPR:
       break;
 
     case BIT_XOR_EXPR:
+    case TRUTH_XOR_EXPR:
       pp_c_exclusive_or_expression (pp, e);
       break;
 
       pp_c_exclusive_or_expression (pp, e);
       break;
 
@@ -1894,10 +2057,12 @@ pp_c_expression (c_pretty_printer *pp, tree e)
       break;
 
     case TRUTH_ANDIF_EXPR:
       break;
 
     case TRUTH_ANDIF_EXPR:
+    case TRUTH_AND_EXPR:
       pp_c_logical_and_expression (pp, e);
       break;
 
     case TRUTH_ORIF_EXPR:
       pp_c_logical_and_expression (pp, e);
       break;
 
     case TRUTH_ORIF_EXPR:
+    case TRUTH_OR_EXPR:
       pp_c_logical_or_expression (pp, e);
       break;
 
       pp_c_logical_or_expression (pp, e);
       break;
 
@@ -1910,6 +2075,7 @@ pp_c_expression (c_pretty_printer *pp, tree e)
       pp_conditional_expression (pp, e);
       break;
 
       pp_conditional_expression (pp, e);
       break;
 
+    case POINTER_PLUS_EXPR:
     case PLUS_EXPR:
     case MINUS_EXPR:
       pp_c_additive_expression (pp, e);
     case PLUS_EXPR:
     case MINUS_EXPR:
       pp_c_additive_expression (pp, e);
@@ -1928,7 +2094,6 @@ pp_c_expression (c_pretty_printer *pp, tree e)
       pp_c_right_paren (pp);
       break;
 
       pp_c_right_paren (pp);
       break;
 
-    case NOP_EXPR:
     case NON_LVALUE_EXPR:
     case SAVE_EXPR:
       pp_expression (pp, TREE_OPERAND (e, 0));
     case NON_LVALUE_EXPR:
     case SAVE_EXPR:
       pp_expression (pp, TREE_OPERAND (e, 0));
@@ -1938,6 +2103,12 @@ pp_c_expression (c_pretty_printer *pp, tree e)
       pp_postfix_expression (pp, TREE_OPERAND (e, 1));
       break;
 
       pp_postfix_expression (pp, TREE_OPERAND (e, 1));
       break;
 
+    case BIND_EXPR:
+      /* We don't yet have a way of dumping statements in a
+         human-readable format.  */
+      pp_string (pp, "({...})");
+      break;
+
     default:
       pp_unsupported_tree (pp, e);
       break;
     default:
       pp_unsupported_tree (pp, e);
       break;
@@ -1948,118 +2119,16 @@ pp_c_expression (c_pretty_printer *pp, tree e)
 \f
 /* Statements.  */
 
 \f
 /* Statements.  */
 
-/* statement:
-      labeled-statement
-      compound-statement
-      expression-statement
-      selection-statement
-      iteration-statement
-      jump-statement   */
-
 void
 pp_c_statement (c_pretty_printer *pp, tree stmt)
 {
 void
 pp_c_statement (c_pretty_printer *pp, tree stmt)
 {
-  enum tree_code code;
-
   if (stmt == NULL)
     return;
 
   if (pp_needs_newline (pp))
     pp_newline_and_indent (pp, 0);
 
   if (stmt == NULL)
     return;
 
   if (pp_needs_newline (pp))
     pp_newline_and_indent (pp, 0);
 
-  code = TREE_CODE (stmt);
-  switch (code)
-    {
-      /* expression-statement:
-            expression(opt) ;  */
-    case EXPR_STMT:
-      pp_expression (pp, EXPR_STMT_EXPR (stmt));
-      pp_c_semicolon (pp);
-      pp_needs_newline (pp) = true;
-      break;
-
-    case SWITCH_STMT:
-      pp_c_identifier (pp, "switch");
-      pp_space (pp);
-      pp_c_left_paren (pp);
-      pp_expression (pp, SWITCH_COND (stmt));
-      pp_c_right_paren (pp);
-      pp_indentation (pp) += 3;
-      pp_needs_newline (pp) = true;
-      pp_statement (pp, SWITCH_BODY (stmt));
-      pp_newline_and_indent (pp, -3);
-      break;
-
-      /* iteration-statement:
-            while ( expression ) statement
-            do statement while ( expression ) ;
-            for ( expression(opt) ; expression(opt) ; expression(opt) ) statement
-            for ( declaration expression(opt) ; expression(opt) ) statement  */
-    case WHILE_STMT:
-      pp_c_identifier (pp, "while");
-      pp_space (pp);
-      pp_c_left_paren (pp);
-      pp_expression (pp, WHILE_COND (stmt));
-      pp_c_right_paren (pp);
-      pp_newline_and_indent (pp, 3);
-      pp_statement (pp, WHILE_BODY (stmt));
-      pp_indentation (pp) -= 3;
-      pp_needs_newline (pp) = true;
-      break;
-
-    case DO_STMT:
-      pp_c_identifier (pp, "do");
-      pp_newline_and_indent (pp, 3);
-      pp_statement (pp, DO_BODY (stmt));
-      pp_newline_and_indent (pp, -3);
-      pp_c_identifier (pp, "while");
-      pp_space (pp);
-      pp_c_left_paren (pp);
-      pp_expression (pp, DO_COND (stmt));
-      pp_c_right_paren (pp);
-      pp_c_semicolon (pp);
-      pp_needs_newline (pp) = true;
-      break;
-
-    case FOR_STMT:
-      pp_c_identifier (pp, "for");
-      pp_space (pp);
-      pp_c_left_paren (pp);
-      if (FOR_INIT_STMT (stmt))
-        pp_statement (pp, FOR_INIT_STMT (stmt));
-      else
-        pp_c_semicolon (pp);
-      pp_needs_newline (pp) = false;
-      pp_c_whitespace (pp);
-      if (FOR_COND (stmt))
-       pp_expression (pp, FOR_COND (stmt));
-      pp_c_semicolon (pp);
-      pp_needs_newline (pp) = false;
-      pp_c_whitespace (pp);
-      if (FOR_EXPR (stmt))
-       pp_expression (pp, FOR_EXPR (stmt));
-      pp_c_right_paren (pp);
-      pp_newline_and_indent (pp, 3);
-      pp_statement (pp, FOR_BODY (stmt));
-      pp_indentation (pp) -= 3;
-      pp_needs_newline (pp) = true;
-      break;
-
-      /* jump-statement:
-            goto identifier;
-            continue ;
-            return expression(opt) ;  */
-    case BREAK_STMT:
-    case CONTINUE_STMT:
-      pp_identifier (pp, code == BREAK_STMT ? "break" : "continue");
-      pp_c_semicolon (pp);
-      pp_needs_newline (pp) = true;
-      break;
-
-    default:
-      dump_generic_node (pp_base (pp), stmt, pp_indentation (pp), 0, true);
-      break;
-    }
+  dump_generic_node (pp_base (pp), stmt, pp_indentation (pp), 0, true);
 }
 
 \f
 }
 
 \f
@@ -2086,6 +2155,7 @@ pp_c_pretty_printer_init (c_pretty_printer *pp)
 
   pp->statement                 = pp_c_statement;
 
 
   pp->statement                 = pp_c_statement;
 
+  pp->constant                  = pp_c_constant;
   pp->id_expression             = pp_c_id_expression;
   pp->primary_expression        = pp_c_primary_expression;
   pp->postfix_expression        = pp_c_postfix_expression;
   pp->id_expression             = pp_c_id_expression;
   pp->primary_expression        = pp_c_primary_expression;
   pp->postfix_expression        = pp_c_postfix_expression;
@@ -2139,8 +2209,7 @@ pp_c_tree_decl_identifier (c_pretty_printer *pp, tree t)
 {
   const char *name;
 
 {
   const char *name;
 
-  if (!DECL_P (t))
-    abort ();
+  gcc_assert (DECL_P (t));
 
   if (DECL_NAME (t))
     name = IDENTIFIER_POINTER (DECL_NAME (t));
 
   if (DECL_NAME (t))
     name = IDENTIFIER_POINTER (DECL_NAME (t));