public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Gaius Mulley <gaius@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-5721] Format error in m2pp.cc (m2pp_integer_cst) [PR107234]
Date: Mon,  6 Feb 2023 18:50:39 +0000 (GMT)	[thread overview]
Message-ID: <20230206185039.342D73858D1E@sourceware.org> (raw)

https://gcc.gnu.org/g:17d0892d61a82a338925c81853b45eb8b4929fc0

commit r13-5721-g17d0892d61a82a338925c81853b45eb8b4929fc0
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Mon Feb 6 18:50:18 2023 +0000

    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>

Diff:
---
 gcc/m2/m2pp.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/m2/m2pp.cc b/gcc/m2/m2pp.cc
index 3f4518074c8..21d1cb9dce7 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);
 }

                 reply	other threads:[~2023-02-06 18:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230206185039.342D73858D1E@sourceware.org \
    --to=gaius@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).