#include "coretypes.h"
#include "tm.h"
#include "tree.h"
+#include "version.h"
#include "flags.h"
#include "real.h"
#include "c-common.h"
if (i < n)
*p++ = "08ce"[n - i];
sprintf (p, "p%d", fmt->emax * fmt->log2_b);
+ if (fmt->pnan < fmt->p)
+ {
+ /* This is an IBM extended double format made up of two IEEE
+ doubles. The value of the long double is the sum of the
+ values of the two parts. The most significant part is
+ required to be the value of the long double rounded to the
+ nearest double. Rounding means we need a slightly smaller
+ value for LDBL_MAX. */
+ buf[4 + fmt->pnan / 4] = "7bde"[fmt->pnan % 4];
+ }
}
sprintf (name, "__%s_MAX__", name_prefix);
builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix);
if (!flag_signed_char)
cpp_define (pfile, "__CHAR_UNSIGNED__");
- if (c_dialect_cxx () && TREE_UNSIGNED (wchar_type_node))
+ if (c_dialect_cxx () && TYPE_UNSIGNED (wchar_type_node))
cpp_define (pfile, "__WCHAR_UNSIGNED__");
/* Make the choice of ObjC runtime visible to source code. */
default: abort ();
}
- value = values[idx + TREE_UNSIGNED (type)];
- suffix = suffixes[is_long * 2 + TREE_UNSIGNED (type)];
+ value = values[idx + TYPE_UNSIGNED (type)];
+ suffix = suffixes[is_long * 2 + TYPE_UNSIGNED (type)];
buf = alloca (strlen (macro) + 1 + strlen (value) + strlen (suffix) + 1);
sprintf (buf, "%s=%s%s", macro, value, suffix);