From patchwork Sat Dec 15 17:47:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Ada] Fix PR ada/53996 Date: Sat, 15 Dec 2012 07:47:24 -0000 From: Eric Botcazou X-Patchwork-Id: 206631 Message-Id: <1438918.O2MkPNOEJC@polaris> To: gcc-patches@gcc.gnu.org Cc: ettl.martin@gmx.de 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 Martin Ettl PR ada/53996 * gcc-interface/utils.c (gnat_type_for_size): Use %u in lieu of %d. 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); }