public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug translation/93836] teach xgettext what HOST_WIDE_INT_PRINT means
Date: Thu, 28 Oct 2021 15:20:30 +0000	[thread overview]
Message-ID: <bug-93836-4-gYfw49Bxkv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-93836-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93836

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-10-28

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
The -Wformat checkers can't detect using the HOST_WIDE_INT_PRINT because by the
time they run macros have been expanded and adjacent string literals
concatenated.  They can only detect this problem when compiling for the targets
with the unsupported format directives (like %I64d), which I would expect they
already do.

The problem could be detected by some script, maybe the one that scrapes the
format strings out of the sources and generates the gcc.pot file.  IMO, a good
time to do this is either during bootstrap, or during make check, regardless of
the target.

Anyway, the problematic code is still there in GCC 12(see below) so confirmed.

          if (type != CPP_EOF)
            error ("junk at end of %<#pragma CTABLE_ENTRY%>");
          else if (i >= ARRAY_SIZE (pru_ctable))
            error ("%<CTABLE_ENTRY%> index %" HOST_WIDE_INT_PRINT "d"
                   " is not valid", i);
          else if (pru_ctable[i].valid && pru_ctable[i].base != base)
            error ("redefinition of %<CTABLE_ENTRY "
                   "%" HOST_WIDE_INT_PRINT "d%>", i);
          else
            {
              if (base & 0xff)
                warning (0, "%<CTABLE_ENTRY%> base address is not "
                            "a multiple of 256");
              pru_ctable[i].base = base;
              pru_ctable[i].valid = true;
            }

  parent reply	other threads:[~2021-10-28 15:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-93836-4@http.gcc.gnu.org/bugzilla/>
2021-10-28  2:37 ` egallager at gcc dot gnu.org
2021-10-28 15:20 ` msebor at gcc dot gnu.org [this message]
2021-10-28 15:22 ` msebor at gcc dot gnu.org
2021-11-02  9:49 ` marxin at gcc dot gnu.org

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=bug-93836-4-gYfw49Bxkv@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).