From: H.J. Lu Date: Mon, 13 Oct 2014 16:01:40 +0000 (+0000) Subject: Cast size and elements to long for %l X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aaf7bd8a503f30585ee16e7abec2d7d08ff25744;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 18eef9a9960..c94916c89f5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2014-10-13 H.J. Lu + + * 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 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c, diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 6b8f7066aa0..445acd75ad7 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -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; diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 47b5d93b261..390e63ee6d4 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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 ()); }