Cast size and elements to long for %l
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 13 Oct 2014 16:01:40 +0000 (16:01 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 13 Oct 2014 16:01:40 +0000 (09:01 -0700)
* 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

gcc/cp/ChangeLog
gcc/cp/mangle.c
gcc/cp/pt.c

index 18eef9a9960b5c3e57917e75e35a9213b82c5a39..c94916c89f5ae337b6116edf412b644cbf7f552e 100644 (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,
index 6b8f7066aa01e63dea20a8d65512e07b1f9fee9d..445acd75ad7f8f186981b05c7d2eafcc8f401388 100644 (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;
 
index 47b5d93b261d9cd9ab641a829d8c33836b203352..390e63ee6d4eeba672c6798a95da67ef26b8c90d 100644 (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 ());
 }