if (dump_file && *dir.beg)
{
- fprintf (dump_file, " Result: %lli, %lli, %lli, %lli "
- "(%lli, %lli, %lli, %lli)\n",
- (long long)fmtres.range.min,
- (long long)fmtres.range.likely,
- (long long)fmtres.range.max,
- (long long)fmtres.range.unlikely,
- (long long)res->range.min,
- (long long)res->range.likely,
- (long long)res->range.max,
- (long long)res->range.unlikely);
+ fprintf (dump_file,
+ " Result: "
+ HOST_WIDE_INT_PRINT_DEC ", " HOST_WIDE_INT_PRINT_DEC ", "
+ HOST_WIDE_INT_PRINT_DEC ", " HOST_WIDE_INT_PRINT_DEC " ("
+ HOST_WIDE_INT_PRINT_DEC ", " HOST_WIDE_INT_PRINT_DEC ", "
+ HOST_WIDE_INT_PRINT_DEC ", " HOST_WIDE_INT_PRINT_DEC ")\n",
+ fmtres.range.min, fmtres.range.likely,
+ fmtres.range.max, fmtres.range.unlikely,
+ res->range.min, res->range.likely,
+ res->range.max, res->range.unlikely);
}
return true;
if (dump_file)
{
- fprintf (dump_file, " Directive %u at offset %llu: \"%.*s\", "
- "length = %llu\n",
+ fprintf (dump_file, " Directive %u at offset "
+ HOST_WIDE_INT_PRINT_UNSIGNED ": \"%.*s\", "
+ "length = " HOST_WIDE_INT_PRINT_UNSIGNED "\n",
dir.dirno,
- (unsigned long long)(size_t)(dir.beg - info.fmtstr),
- (int)dir.len, dir.beg, (unsigned long long)dir.len);
+ (unsigned HOST_WIDE_INT)(size_t)(dir.beg - info.fmtstr),
+ (int)dir.len, dir.beg, dir.len);
}
return len - !*str;
if (dump_file)
{
- fprintf (dump_file, " Directive %u at offset %llu: \"%.*s\"",
- dir.dirno, (unsigned long long)(size_t)(dir.beg - info.fmtstr),
+ fprintf (dump_file,
+ " Directive %u at offset " HOST_WIDE_INT_PRINT_UNSIGNED
+ ": \"%.*s\"",
+ dir.dirno,
+ (unsigned HOST_WIDE_INT)(size_t)(dir.beg - info.fmtstr),
(int)dir.len, dir.beg);
if (star_width)
{
if (dir.width[0] == dir.width[1])
- fprintf (dump_file, ", width = %lli", (long long)dir.width[0]);
+ fprintf (dump_file, ", width = " HOST_WIDE_INT_PRINT_DEC,
+ dir.width[0]);
else
- fprintf (dump_file, ", width in range [%lli, %lli]",
- (long long)dir.width[0], (long long)dir.width[1]);
+ fprintf (dump_file,
+ ", width in range [" HOST_WIDE_INT_PRINT_DEC
+ ", " HOST_WIDE_INT_PRINT_DEC "]",
+ dir.width[0], dir.width[1]);
}
if (star_precision)
{
if (dir.prec[0] == dir.prec[1])
- fprintf (dump_file, ", precision = %lli", (long long)dir.prec[0]);
+ fprintf (dump_file, ", precision = " HOST_WIDE_INT_PRINT_DEC,
+ dir.prec[0]);
else
- fprintf (dump_file, ", precision in range [%lli, %lli]",
- (long long)dir.prec[0], (long long)dir.prec[1]);
+ fprintf (dump_file,
+ ", precision in range [" HOST_WIDE_INT_PRINT_DEC
+ HOST_WIDE_INT_PRINT_DEC "]",
+ dir.prec[0], dir.prec[1]);
}
fputc ('\n', dump_file);
}
LOCATION_FILE (callloc), LOCATION_LINE (callloc));
print_generic_expr (dump_file, info.func, dump_flags);
- fprintf (dump_file, ": objsize = %llu, fmtstr = \"%s\"\n",
- (unsigned long long)info.objsize, info.fmtstr);
+ fprintf (dump_file,
+ ": objsize = " HOST_WIDE_INT_PRINT_UNSIGNED
+ ", fmtstr = \"%s\"\n",
+ info.objsize, info.fmtstr);
}
/* Reset the minimum and maximum byte counters. */
const char *what = setrange ? "Setting" : "Discarding";
if (retval[0] != retval[1])
fprintf (dump_file,
- " %s %s-bounds return value range [%llu, %llu].\n",
- what, inbounds,
- (unsigned long long)retval[0],
- (unsigned long long)retval[1]);
+ " %s %s-bounds return value range ["
+ HOST_WIDE_INT_PRINT_UNSIGNED ", "
+ HOST_WIDE_INT_PRINT_UNSIGNED "].\n",
+ what, inbounds, retval[0], retval[1]);
else
- fprintf (dump_file, " %s %s-bounds return value %llu.\n",
- what, inbounds, (unsigned long long)retval[0]);
+ fprintf (dump_file, " %s %s-bounds return value "
+ HOST_WIDE_INT_PRINT_UNSIGNED ".\n",
+ what, inbounds, retval[0]);
}
}
value_range_type rng = get_range_info (offset, &min, &max);
if (rng == VR_RANGE)
{
- offrange[0] = min.to_shwi ();
- offrange[1] = max.to_shwi ();
+ offrange[0] = offset_int::from (min, SIGNED);
+ offrange[1] = offset_int::from (max, SIGNED);
}
else if (rng == VR_ANTI_RANGE)
{
- offrange[0] = (max + 1).to_shwi ();
- offrange[1] = (min - 1).to_shwi ();
+ offrange[0] = offset_int::from (max + 1, SIGNED);
+ offrange[1] = offset_int::from (min - 1, SIGNED);
}
else
{
if (dstref.offrange[0] == dstref.offrange[1]
|| dstref.offrange[1] > HOST_WIDE_INT_MAX)
- sprintf (offstr[0], "%lli", (long long) dstref.offrange[0].to_shwi ());
+ sprintf (offstr[0], HOST_WIDE_INT_PRINT_DEC,
+ dstref.offrange[0].to_shwi ());
else
- sprintf (offstr[0], "[%lli, %lli]",
- (long long) dstref.offrange[0].to_shwi (),
- (long long) dstref.offrange[1].to_shwi ());
+ sprintf (offstr[0],
+ "[" HOST_WIDE_INT_PRINT_DEC ", " HOST_WIDE_INT_PRINT_DEC "]",
+ dstref.offrange[0].to_shwi (),
+ dstref.offrange[1].to_shwi ());
if (srcref.offrange[0] == srcref.offrange[1]
|| srcref.offrange[1] > HOST_WIDE_INT_MAX)
- sprintf (offstr[1], "%lli", (long long) srcref.offrange[0].to_shwi ());
+ sprintf (offstr[1],
+ HOST_WIDE_INT_PRINT_DEC,
+ srcref.offrange[0].to_shwi ());
else
- sprintf (offstr[1], "[%lli, %lli]",
- (long long) srcref.offrange[0].to_shwi (),
- (long long) srcref.offrange[1].to_shwi ());
+ sprintf (offstr[1],
+ "[" HOST_WIDE_INT_PRINT_DEC ", " HOST_WIDE_INT_PRINT_DEC "]",
+ srcref.offrange[0].to_shwi (),
+ srcref.offrange[1].to_shwi ());
if (ovloff[0] == ovloff[1] || !ovloff[1])
- sprintf (offstr[2], "%lli", (long long) ovloff[0]);
+ sprintf (offstr[2], HOST_WIDE_INT_PRINT_DEC, ovloff[0]);
else
- sprintf (offstr[2], "[%lli, %lli]",
- (long long) ovloff[0], (long long) ovloff[1]);
+ sprintf (offstr[2],
+ "[" HOST_WIDE_INT_PRINT_DEC ", " HOST_WIDE_INT_PRINT_DEC "]",
+ ovloff[0], ovloff[1]);
const offset_int maxobjsize = tree_to_shwi (max_object_size ());
bool must_overlap = ovlsiz[0] > 0;
}
/* Issue "may overlap" diagnostics below. */
- gcc_assert (ovlsiz[0] == 0
- && ovlsiz[1] > 0
- && ovlsiz[1] <= maxobjsize.to_shwi ());
/* Use more concise wording when one of the offsets is unbounded
to avoid confusing the user with large and mostly meaningless