aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-02-06 18:50:18 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2023-02-06 18:50:18 +0000
commit17d0892d61a82a338925c81853b45eb8b4929fc0 (patch)
treee06efcad00c9e3f2577bc64c4e5ffb44a51260f2
parent45e01229af33a3dc3f124dcaec4b4ae11e9d07ce (diff)
downloadgcc-17d0892d61a82a338925c81853b45eb8b4929fc0.zip
gcc-17d0892d61a82a338925c81853b45eb8b4929fc0.tar.gz
gcc-17d0892d61a82a338925c81853b45eb8b4929fc0.tar.bz2
Format error in m2pp.cc (m2pp_integer_cst) [PR107234]
Use HOST_WIDE_INT_PRINT_UNSIGNED instead of hardcoding a specific format. gcc/m2/ChangeLog: * m2pp.cc (m2pp_integer_cst): Use HOST_WIDE_INT_PRINT_UNSIGNED as the format specifier. PR modula2/107234 Co-Authored by: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
-rw-r--r--gcc/m2/m2pp.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/m2/m2pp.cc b/gcc/m2/m2pp.cc
index 3f45180..21d1cb9 100644
--- a/gcc/m2/m2pp.cc
+++ b/gcc/m2/m2pp.cc
@@ -2068,7 +2068,7 @@ m2pp_integer_cst (pretty *s, tree t)
{
char val[100];
- snprintf (val, 100, "%lud", TREE_INT_CST_LOW (t));
+ snprintf (val, 100, HOST_WIDE_INT_PRINT_UNSIGNED, TREE_INT_CST_LOW (t));
m2pp_print (s, val);
}