From c3d79c606a2cd3647c77d2893abd643ecf41f250 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 15 Dec 2012 17:50:49 +0000 Subject: [PATCH] re PR ada/53996 (format string issue in gcc-interface/utils.c) PR ada/53996 * gcc-interface/utils.c (gnat_type_for_size): Use %u in lieu of %d. Co-Authored-By: Martin Ettl From-SVN: r194520 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/gcc-interface/utils.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index bf9ce421756..85b1a8f82f1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2012-12-15 Eric Botcazou + Martin Ettl + + PR ada/53996 + * gcc-interface/utils.c (gnat_type_for_size): Use %u in lieu of %d. + 2012-12-11 Eric Botcazou * gcc-interface/Make-lang.in (RTS_DIR): Define only if Ada is enabled. diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 2d448d1ddb9..309cff6ad32 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -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); }