As reported by Martin, there is a small inconsistency in gnat_type_for_size, 
where %d is used instead of %u for an unsigned value in a format string.

Tested on x86_64-suse-linux, applied on the mainline.


2012-12-15  Eric Botcazou  <ebotca...@adacore.com>
            Martin Ettl  <ettl.mar...@gmx.de>

        PR ada/53996
        * gcc-interface/utils.c (gnat_type_for_size): Use %u in lieu of %d.


-- 
Eric Botcazou
Index: gcc-interface/utils.c
===================================================================
--- gcc-interface/utils.c	(revision 194517)
+++ gcc-interface/utils.c	(working copy)
@@ -2797,7 +2797,7 @@ gnat_type_for_size (unsigned precision,
 
   if (!TYPE_NAME (t))
     {
-      sprintf (type_name, "%sSIGNED_%d", unsignedp ? "UN" : "", precision);
+      sprintf (type_name, "%sSIGNED_%u", unsignedp ? "UN" : "", precision);
       TYPE_NAME (t) = get_identifier (type_name);
     }
 

Reply via email to