#include "config.h"
#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
#include "real.h"
#include "c-pretty-print.h"
#include "c-tree.h"
{
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);
}
}
-/* Print out a REAL value. */
+/* Print out a REAL value. */
static inline void
pp_c_real_literal (ppi, r)
c_pretty_printer ppi;
tree r;
{
- REAL_VALUE_TO_DECIMAL (TREE_REAL_CST (r), "%.16g",
- pp_buffer (ppi)->digit_buffer);
+ 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);
}
break;
default:
- /* Make sure this call won't cause any infinite loop. */
+ /* Make sure this call won't cause any infinite loop. */
pp_c_left_paren (ppi);
pp_c_expression (ppi, e);
pp_c_right_paren (ppi);
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);
case GOTO_STMT:
{
tree e = code == RETURN_STMT
- ? RETURN_EXPR (stmt)
+ ? RETURN_STMT_EXPR (stmt)
: GOTO_DESTINATION (stmt);
pp_newline (ppi);