re PR ada/53996 (format string issue in gcc-interface/utils.c)
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 15 Dec 2012 17:50:49 +0000 (17:50 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 15 Dec 2012 17:50:49 +0000 (17:50 +0000)
PR ada/53996
* gcc-interface/utils.c (gnat_type_for_size): Use %u in lieu of %d.

Co-Authored-By: Martin Ettl <ettl.martin@gmx.de>
From-SVN: r194520

gcc/ada/ChangeLog
gcc/ada/gcc-interface/utils.c

index bf9ce42..85b1a8f 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-15  Eric Botcazou  <ebotcazou@adacore.com>
+           Martin Ettl  <ettl.martin@gmx.de>
+
+       PR ada/53996
+       * gcc-interface/utils.c (gnat_type_for_size): Use %u in lieu of %d.
+
 2012-12-11  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/Make-lang.in (RTS_DIR): Define only if Ada is enabled.
index 2d448d1..309cff6 100644 (file)
@@ -2797,7 +2797,7 @@ gnat_type_for_size (unsigned precision, int unsignedp)
 
   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);
     }