OSDN Git Service

* calls.c (expand_call): Convert structure_value_addr to Pmode if
[pf3gnuchains/gcc-fork.git] / gcc / c-pretty-print.c
index 0961798..39d7258 100644 (file)
@@ -21,6 +21,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #include "config.h"
 #include "system.h"
+#include "coretypes.h"
+#include "tm.h"
 #include "real.h"
 #include "c-pretty-print.h"
 #include "c-tree.h"
@@ -447,14 +449,11 @@ pp_c_integer_literal (ppi, i)
        {
          if (tree_int_cst_sgn (i) < 0)
            {
-             static char format[10]; /* "%x%09999x\0" */
-             if (!format[0])
-               sprintf (format, "%%x%%0%dx", HOST_BITS_PER_INT / 4);
-
              pp_c_char (ppi, '-');
              i = build_int_2 (-TREE_INT_CST_LOW (i),
                               ~TREE_INT_CST_HIGH (i) + !TREE_INT_CST_LOW (i));
-             sprintf (pp_buffer (ppi)->digit_buffer, format, 
+             sprintf (pp_buffer (ppi)->digit_buffer,
+                      HOST_WIDE_INT_PRINT_DOUBLE_HEX, 
                       TREE_INT_CST_HIGH (i), TREE_INT_CST_LOW (i));
              pp_identifier (ppi, pp_buffer (ppi)->digit_buffer);
 
@@ -469,7 +468,8 @@ pp_c_real_literal (ppi, r)
      c_pretty_printer ppi;
      tree r;
 {
-  REAL_VALUE_TO_DECIMAL (TREE_REAL_CST (r), pp_buffer (ppi)->digit_buffer, -1);
+  real_to_decimal (pp_buffer (ppi)->digit_buffer, &TREE_REAL_CST (r),
+                  sizeof (pp_buffer (ppi)->digit_buffer), 0, 1);
   pp_identifier (ppi, pp_buffer(ppi)->digit_buffer);
 }
 
@@ -715,30 +715,6 @@ pp_c_postfix_expression (ppi, e)
       pp_initializer (ppi, e);
       break;
       
-#if 0
-    case SRCLOC:
-      pp_left_paren (ppi);
-      pp_identifier (ppi, "__location__");
-      pp_right_paren (ppi);
-      pp_whitespace (ppi);
-      pp_left_brace (ppi);
-      pp_dot (ppi);
-      pp_identifier (ppi, "file");
-      pp_whitespace (ppi);
-      pp_equal (ppi);
-      pp_c_whitespace (ppi);
-      pp_c_expression (ppi, SRCLOC_FILE (e));
-      pp_separate_with (ppi, ',');
-      pp_dot (ppi);
-      pp_identifier (ppi, "line");
-      pp_whitespace (ppi);
-      pp_equal (ppi);
-      pp_c_whitespace (ppi);
-      pp_c_expression (ppi, SRCLOC_LINE (e));
-      pp_right_brace (ppi);
-      break;
-#endif
-
     case VA_ARG_EXPR:
       pp_c_identifier (ppi, "__builtin_va_arg");
       pp_c_left_paren (ppi);