if (!dump_ada_node (buffer, elem, NULL_TREE, spc, false, true))
{
pp_string (buffer, "unknown");
- pp_scalar (buffer, "%lu", (unsigned long) TREE_HASH (elem));
+ pp_scalar (buffer, HOST_SIZE_T_PRINT_UNSIGNED,
+ (fmt_size_t) TREE_HASH (elem));
}
}
}
index. */
HOST_WIDE_INT n = tree_to_shwi (max) + 1;
char buf[40];
- sprintf (buf, "%lu", (unsigned long)n);
+ sprintf (buf, HOST_WIDE_INT_PRINT_UNSIGNED, n);
spec += buf;
}
continue;
char buf[40];
unsigned HOST_WIDE_INT n = tree_to_uhwi (nelts);
- sprintf (buf, "%llu", (unsigned long long)n);
+ sprintf (buf, HOST_WIDE_INT_PRINT_UNSIGNED, n);
spec += buf;
break;
}
if (stack_vars[i].representative != i)
continue;
- fprintf (dump_file, "Partition %lu: size ", (unsigned long) i);
+ fprintf (dump_file, "Partition " HOST_SIZE_T_PRINT_UNSIGNED ": size ",
+ (fmt_size_t) i);
print_dec (stack_vars[i].size, dump_file);
fprintf (dump_file, " align %u\n", stack_vars[i].alignb);
dump_class_hierarchy_1 (FILE *stream, dump_flags_t flags, tree t)
{
fprintf (stream, "Class %s\n", type_as_string (t, TFF_PLAIN_IDENTIFIER));
- fprintf (stream, " size=%lu align=%lu\n",
- (unsigned long)(tree_to_shwi (TYPE_SIZE (t)) / BITS_PER_UNIT),
- (unsigned long)(TYPE_ALIGN (t) / BITS_PER_UNIT));
+ fprintf (stream, " size=" HOST_WIDE_INT_PRINT_UNSIGNED " align=%u\n",
+ tree_to_shwi (TYPE_SIZE (t)) / BITS_PER_UNIT,
+ TYPE_ALIGN (t) / BITS_PER_UNIT);
if (tree as_base = CLASSTYPE_AS_BASE (t))
- fprintf (stream, " base size=%lu base align=%lu\n",
- (unsigned long)(tree_to_shwi (TYPE_SIZE (as_base))
- / BITS_PER_UNIT),
- (unsigned long)(TYPE_ALIGN (as_base) / BITS_PER_UNIT));
+ fprintf (stream, " base size=" HOST_WIDE_INT_PRINT_UNSIGNED
+ " base align=%u\n",
+ tree_to_shwi (TYPE_SIZE (as_base)) / BITS_PER_UNIT,
+ TYPE_ALIGN (as_base) / BITS_PER_UNIT);
dump_class_hierarchy_r (stream, flags, TYPE_BINFO (t), TYPE_BINFO (t), 0);
fprintf (stream, "\n");
}
if (cp_lexer_debugging_p (lexer))
fprintf (cp_lexer_debug_stream,
- "cp_lexer: peeking ahead %ld at token: ", (long)n);
+ "cp_lexer: peeking ahead " HOST_SIZE_T_PRINT_DEC " at token: ",
+ (fmt_size_t) n);
--n;
token = lexer->next_token;
void
print_template_statistics (void)
{
- fprintf (stderr, "decl_specializations: size %ld, %ld elements, "
- "%f collisions\n", (long) decl_specializations->size (),
- (long) decl_specializations->elements (),
+ fprintf (stderr, "decl_specializations: size " HOST_SIZE_T_PRINT_DEC ", "
+ HOST_SIZE_T_PRINT_DEC " elements, %f collisions\n",
+ (fmt_size_t) decl_specializations->size (),
+ (fmt_size_t) decl_specializations->elements (),
decl_specializations->collisions ());
- fprintf (stderr, "type_specializations: size %ld, %ld elements, "
- "%f collisions\n", (long) type_specializations->size (),
- (long) type_specializations->elements (),
+ fprintf (stderr, "type_specializations: size " HOST_SIZE_T_PRINT_DEC ", "
+ HOST_SIZE_T_PRINT_DEC " elements, %f collisions\n",
+ (fmt_size_t) type_specializations->size (),
+ (fmt_size_t) type_specializations->elements (),
type_specializations->collisions ());
}
while (virtuals)
{
tree fndecl = TREE_VALUE (virtuals);
- fprintf (stderr, "%s [%ld =? %ld]\n",
+ fprintf (stderr, "%s [" HOST_WIDE_INT_PRINT_DEC " =? "
+ HOST_WIDE_INT_PRINT_DEC "]\n",
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl)),
- (long) n, (long) TREE_INT_CST_LOW (DECL_VINDEX (fndecl)));
+ n, TREE_INT_CST_LOW (DECL_VINDEX (fndecl)));
++n;
virtuals = TREE_CHAIN (virtuals);
}
file_num = maybe_emit_file (fd);
dw2_asm_output_data (1, DW_MACINFO_start_file, "Start new file");
dw2_asm_output_data_uleb128 (ref->lineno,
- "Included from line number %lu",
- (unsigned long) ref->lineno);
+ "Included from line number "
+ HOST_WIDE_INT_PRINT_UNSIGNED,
+ ref->lineno);
dw2_asm_output_data_uleb128 (file_num, "file %s", ref->info);
break;
case DW_MACINFO_end_file:
dw2_asm_output_data (1, ref->code,
ref->code == DW_MACINFO_define
? "Define macro" : "Undefine macro");
- dw2_asm_output_data_uleb128 (ref->lineno, "At line number %lu",
- (unsigned long) ref->lineno);
+ dw2_asm_output_data_uleb128 (ref->lineno,
+ "At line number "
+ HOST_WIDE_INT_PRINT_UNSIGNED,
+ ref->lineno);
dw2_asm_output_nstring (ref->info, -1, "The macro");
break;
case DW_MACRO_define_strp:
gcc_assert (node
&& (node->form == DW_FORM_strp
|| node->form == dwarf_FORM (DW_FORM_strx)));
- dw2_asm_output_data_uleb128 (ref->lineno, "At line number %lu",
- (unsigned long) ref->lineno);
+ dw2_asm_output_data_uleb128 (ref->lineno,
+ "At line number "
+ HOST_WIDE_INT_PRINT_UNSIGNED,
+ ref->lineno);
if (node->form == DW_FORM_strp)
dw2_asm_output_offset (dwarf_offset_size, node->label,
debug_str_section, "The macro: \"%s\"",
found_length = current_length;
else if (found_length != current_length)
{
- gfc_error ("Different CHARACTER lengths (%ld/%ld) in array"
- " constructor at %L", (long) found_length,
- (long) current_length, &p->expr->where);
+ gfc_error ("Different CHARACTER lengths (%wd/%wd) in array"
+ " constructor at %L", found_length,
+ current_length, &p->expr->where);
return false;
}
else
{
gfc_warning_now (0, "Initialization string at %L was truncated to "
- "fit the variable (%ld/%ld)", &rvalue->where,
- (long) tlen, (long) len);
+ "fit the variable (%wd/%wd)", &rvalue->where,
+ tlen, len);
len = tlen;
}
}
if (rlen && llen && rlen > llen)
gfc_warning_now (OPT_Wcharacter_truncation,
"CHARACTER expression will be truncated "
- "in assignment (%ld/%ld) at %L",
- (long) llen, (long) rlen, &code->loc);
+ "in assignment (%wd/%wd) at %L",
+ llen, rlen, &code->loc);
}
/* Ensure that a vector index expression for the lvalue is evaluated
if (!tree_int_cst_equal (DECL_SIZE_UNIT (decl), size)
&& strcmp (com->name, BLANK_COMMON_NAME))
gfc_warning (0, "Named COMMON block %qs at %L shall be of the "
- "same size as elsewhere (%lu vs %lu bytes)", com->name,
+ "same size as elsewhere (%wu vs %wu bytes)", com->name,
&com->where,
- (unsigned long) TREE_INT_CST_LOW (size),
- (unsigned long) TREE_INT_CST_LOW (DECL_SIZE_UNIT (decl)));
+ TREE_INT_CST_LOW (size),
+ TREE_INT_CST_LOW (DECL_SIZE_UNIT (decl)));
if (tree_int_cst_lt (DECL_SIZE_UNIT (decl), size))
{
/* stamp */
unsigned stamp = gcov_read_unsigned ();
- printf ("%s:stamp %lu\n", filename, (unsigned long)stamp);
+ printf ("%s:stamp %u\n", filename, stamp);
/* Checksum */
unsigned checksum = gcov_read_unsigned ();
- printf ("%s:checksum %lu\n", filename, (unsigned long)checksum);
+ printf ("%s:checksum %u\n", filename, checksum);
if (!is_data_type)
{
{
error_at_line
(&lexer_line,
- "rtx type `%s' has `0' in position %lu, can't handle",
- rtx_name[i], (unsigned long) aindex);
+ "rtx type `%s' has `0' in position "
+ HOST_SIZE_T_PRINT_UNSIGNED ", can't handle",
+ rtx_name[i], (fmt_size_t) aindex);
t = &string_type;
subname = "rt_int";
}
default:
error_at_line
(&lexer_line,
- "rtx type `%s' has `%c' in position %lu, can't handle",
+ "rtx type `%s' has `%c' in position "
+ HOST_SIZE_T_PRINT_UNSIGNED ", can't handle",
rtx_name[i], rtx_format[i][aindex],
- (unsigned long) aindex);
+ (fmt_size_t) aindex);
t = &string_type;
subname = "rt_int";
break;
do
{
if (c->namelen > 2)
- printf (" if (!strncmp (str + 1, \"%s\", %lu))\n"
+ printf (" if (!strncmp (str + 1, \"%s\", "
+ HOST_SIZE_T_PRINT_UNSIGNED "))\n"
" return CONSTRAINT_%s;\n",
- c->name + 1, (unsigned long int) c->namelen - 1,
+ c->name + 1, (fmt_size_t) (c->namelen - 1),
c->c_name);
else
printf (" if (str[1] == '%c')\n"
}
}
- printf (" case '%c': return %lu;\n",
- i, (unsigned long int) c->namelen);
+ printf (" case '%c': return " HOST_SIZE_T_PRINT_UNSIGNED ";\n",
+ i, (fmt_size_t) c->namelen);
}
puts (" default: break;\n"
if (GGC_DEBUG_LEVEL >= 2)
fprintf (G.debug_file,
- "Allocating page at %p, object size=%lu, data %p-%p\n",
- (void *) entry, (unsigned long) OBJECT_SIZE (order),
+ "Allocating page at %p, object size="
+ HOST_SIZE_T_PRINT_UNSIGNED ", data %p-%p\n",
+ (void *) entry, (fmt_size_t) OBJECT_SIZE (order),
(void *) page, (void *) (page + entry_size - 1));
return entry;
if (GGC_DEBUG_LEVEL >= 3)
fprintf (G.debug_file,
- "Allocating object, requested size=%lu, actual=%lu at %p on %p\n",
- (unsigned long) size, (unsigned long) object_size, result,
+ "Allocating object, requested size="
+ HOST_SIZE_T_PRINT_UNSIGNED ", actual=" HOST_SIZE_T_PRINT_UNSIGNED
+ " at %p on %p\n",
+ (fmt_size_t) size, (fmt_size_t) object_size, result,
(void *) entry);
return result;
if (GGC_DEBUG_LEVEL >= 3)
fprintf (G.debug_file,
- "Freeing object, actual size=%lu, at %p on %p\n",
- (unsigned long) size, p, (void *) pe);
+ "Freeing object, actual size="
+ HOST_SIZE_T_PRINT_UNSIGNED ", at %p on %p\n",
+ (fmt_size_t) size, p, (void *) pe);
#ifdef ENABLE_GC_CHECKING
/* Poison the data, to indicate the data is garbage. */
worklist_push ((*it)->classes[i]);
if (dump_file)
- fprintf (dump_file, "Worklist has been filled with: %lu\n",
- (unsigned long) worklist.nodes ());
+ fprintf (dump_file, "Worklist has been filled with: "
+ HOST_SIZE_T_PRINT_UNSIGNED "\n",
+ (fmt_size_t) worklist.nodes ());
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Congruence class reduction\n");
}
fprintf (dump_file,
- "Congruence classes: %lu with total: %u items (in a non-singular "
- "class: %u)\n", (unsigned long) m_classes.elements (),
+ "Congruence classes: " HOST_SIZE_T_PRINT_UNSIGNED " with total: "
+ "%u items (in a non-singular class: %u)\n",
+ (fmt_size_t) m_classes.elements (),
m_items.length (), m_items.length () - single_element_classes);
fprintf (dump_file,
"Class size histogram [number of members]: number of classes\n");
{
active_playback_ctxt->add_error (loc,
"bitcast with types of different sizes");
- fprintf (stderr, "input expression (size: %ld):\n",
- (long) tree_to_uhwi (expr_size));
+ fprintf (stderr, "input expression (size: " HOST_WIDE_INT_PRINT_DEC "):\n",
+ tree_to_uhwi (expr_size));
debug_tree (t_expr);
- fprintf (stderr, "requested type (size: %ld):\n",
- (long) tree_to_uhwi (type_size));
+ fprintf (stderr, "requested type (size: " HOST_WIDE_INT_PRINT_DEC "):\n",
+ tree_to_uhwi (type_size));
debug_tree (t_dst_type);
}
tree t_bitcast = build1 (VIEW_CONVERT_EXPR, t_dst_type, t_expr);
total_scc_size + num_unshared_trees_read);
if (flag_wpa && tree_scc_hash && num_sccs_read)
{
- fprintf (stderr, "[%s] tree SCC table: size %ld, %ld elements, "
- "collision ratio: %f\n", pfx,
- (long) tree_scc_hash->size (),
- (long) tree_scc_hash->elements (),
+ fprintf (stderr, "[%s] tree SCC table: size " HOST_SIZE_T_PRINT_DEC ", "
+ HOST_SIZE_T_PRINT_DEC " elements, collision ratio: %f\n", pfx,
+ (fmt_size_t) tree_scc_hash->size (),
+ (fmt_size_t) tree_scc_hash->elements (),
tree_scc_hash->collisions ());
hash_table<tree_scc_hasher>::iterator hiter;
tree_scc *scc, *max_scc = NULL;
fprintf (stderr, "[%s] Merged %lu types\n", pfx, num_merged_types);
fprintf (stderr, "[%s] %lu types prevailed (%lu associated trees)\n",
pfx, num_prevailing_types, num_type_scc_trees);
- fprintf (stderr, "[%s] GIMPLE canonical type table: size %ld, "
- "%ld elements, %ld searches, %ld collisions (ratio: %f)\n", pfx,
- (long) htab_size (gimple_canonical_types),
- (long) htab_elements (gimple_canonical_types),
- (long) gimple_canonical_types->searches,
- (long) gimple_canonical_types->collisions,
+ fprintf (stderr, "[%s] GIMPLE canonical type table: size "
+ HOST_SIZE_T_PRINT_DEC ", " HOST_SIZE_T_PRINT_DEC
+ " elements, %d searches, %d collisions (ratio: %f)\n", pfx,
+ (fmt_size_t) htab_size (gimple_canonical_types),
+ (fmt_size_t) htab_elements (gimple_canonical_types),
+ gimple_canonical_types->searches,
+ gimple_canonical_types->collisions,
htab_collisions (gimple_canonical_types));
fprintf (stderr, "[%s] GIMPLE canonical type pointer-map: "
"%lu elements, %ld searches\n", pfx,
dump_hash_table (FILE *file)
{
fprintf (file, "\n\nexpression hash table\n");
- fprintf (file, "size %ld, %ld elements, %f collision/search ratio\n",
- (long) expr_table->size (),
- (long) expr_table->elements (),
+ fprintf (file, "size " HOST_SIZE_T_PRINT_DEC ", " HOST_SIZE_T_PRINT_DEC
+ " elements, %f collision/search ratio\n",
+ (fmt_size_t) expr_table->size (),
+ (fmt_size_t) expr_table->elements (),
expr_table->collisions ());
if (!expr_table->is_empty ())
{
fprintf (file, "\n");
if (dfa_stats.num_phis)
- fprintf (file, "Average number of arguments per PHI node: %.1f (max: %ld)\n",
+ fprintf (file, "Average number of arguments per PHI node: %.1f (max: "
+ HOST_SIZE_T_PRINT_DEC ")\n",
(float) dfa_stats.num_phi_args / (float) dfa_stats.num_phis,
- (long) dfa_stats.max_num_phi_args);
+ (fmt_size_t) dfa_stats.max_num_phi_args);
fprintf (file, "\n");
}
static void
htab_statistics (FILE *file, const hash_table<var_info_hasher> &htab)
{
- fprintf (file, "size %ld, %ld elements, %f collision/search ratio\n",
- (long) htab.size (),
- (long) htab.elements (),
+ fprintf (file, "size " HOST_SIZE_T_PRINT_DEC ", " HOST_SIZE_T_PRINT_DEC
+ " elements, %f collision/search ratio\n",
+ (fmt_size_t) htab.size (),
+ (fmt_size_t) htab.elements (),
htab.collisions ());
}
static void
htab_statistics (FILE *file, const hash_table<expr_elt_hasher> &htab)
{
- fprintf (file, "size %ld, %ld elements, %f collision/search ratio\n",
- (long) htab.size (),
- (long) htab.elements (),
+ fprintf (file, "size " HOST_SIZE_T_PRINT_DEC ", " HOST_SIZE_T_PRINT_DEC
+ " elements, %f collision/search ratio\n",
+ (fmt_size_t) htab.size (),
+ (fmt_size_t) htab.elements (),
htab.collisions ());
}
static void
print_debug_expr_statistics (void)
{
- fprintf (stderr, "DECL_DEBUG_EXPR hash: size %ld, %ld elements, %f collisions\n",
- (long) debug_expr_for_decl->size (),
- (long) debug_expr_for_decl->elements (),
+ fprintf (stderr, "DECL_DEBUG_EXPR hash: size " HOST_SIZE_T_PRINT_DEC ", "
+ HOST_SIZE_T_PRINT_DEC " elements, %f collisions\n",
+ (fmt_size_t) debug_expr_for_decl->size (),
+ (fmt_size_t) debug_expr_for_decl->elements (),
debug_expr_for_decl->collisions ());
}
static void
print_value_expr_statistics (void)
{
- fprintf (stderr, "DECL_VALUE_EXPR hash: size %ld, %ld elements, %f collisions\n",
- (long) value_expr_for_decl->size (),
- (long) value_expr_for_decl->elements (),
+ fprintf (stderr, "DECL_VALUE_EXPR hash: size " HOST_SIZE_T_PRINT_DEC ", "
+ HOST_SIZE_T_PRINT_DEC " elements, %f collisions\n",
+ (fmt_size_t) value_expr_for_decl->size (),
+ (fmt_size_t) value_expr_for_decl->elements (),
value_expr_for_decl->collisions ());
}
static void
print_type_hash_statistics (void)
{
- fprintf (stderr, "Type hash: size %ld, %ld elements, %f collisions\n",
- (long) type_hash_table->size (),
- (long) type_hash_table->elements (),
+ fprintf (stderr, "Type hash: size " HOST_SIZE_T_PRINT_DEC ", "
+ HOST_SIZE_T_PRINT_DEC " elements, %f collisions\n",
+ (fmt_size_t) type_hash_table->size (),
+ (fmt_size_t) type_hash_table->elements (),
type_hash_table->collisions ());
}
for (i = 0; i < var->n_var_parts; i++)
{
- fprintf (dump_file, " offset %ld\n",
- (long)(var->onepart ? 0 : VAR_PART_OFFSET (var, i)));
+ fprintf (dump_file, " offset " HOST_WIDE_INT_PRINT_DEC "\n",
+ var->onepart ? 0 : VAR_PART_OFFSET (var, i));
for (node = var->var_part[i].loc_chain; node; node = node->next)
{
fprintf (dump_file, " ");
p = label;
if (desc->offset)
{
- sprintf (buffer, "%s+%ld", p, (long) (desc->offset));
+ sprintf (buffer, "%s+" HOST_WIDE_INT_PRINT_DEC, p, desc->offset);
p = buffer;
}
ASM_OUTPUT_DEF (asm_out_file, name, p);