Cast size and elements to long for %l

* mangle.c (mangle_conv_op_name_for_type): Cast elements to
	unsigned long.
	(print_template_statistics): Cast size and elements to long.

From-SVN: r216151
This commit is contained in:
H.J. Lu 2014-10-13 16:01:40 +00:00 committed by H.J. Lu
parent daaf6209a4
commit aaf7bd8a50
3 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
* mangle.c (mangle_conv_op_name_for_type): Cast elements to
unsigned long.
(print_template_statistics): Cast size and elements to long.
2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
* cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,

View File

@ -3744,7 +3744,8 @@ mangle_conv_op_name_for_type (const tree type)
char buffer[64];
/* Create a unique name corresponding to TYPE. */
sprintf (buffer, "operator %lu", conv_type_names->elements ());
sprintf (buffer, "operator %lu",
(unsigned long) conv_type_names->elements ());
identifier = get_identifier (buffer);
*slot = identifier;

View File

@ -22324,12 +22324,12 @@ void
print_template_statistics (void)
{
fprintf (stderr, "decl_specializations: size %ld, %ld elements, "
"%f collisions\n", decl_specializations->size (),
decl_specializations->elements (),
"%f collisions\n", (long) decl_specializations->size (),
(long) decl_specializations->elements (),
decl_specializations->collisions ());
fprintf (stderr, "type_specializations: size %ld, %ld elements, "
"%f collisions\n", type_specializations->size (),
type_specializations->elements (),
"%f collisions\n", (long) type_specializations->size (),
(long) type_specializations->elements (),
type_specializations->collisions ());
}