From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0236E3857829; Thu, 28 Oct 2021 15:20:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0236E3857829 From: "msebor at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: translation X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed bug_status cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2021 15:20:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93836 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2021-10-28 --- Comment #4 from Martin Sebor --- 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 tar= gets with the unsupported format directives (like %I64d), which I would expect t= hey 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 g= ood time to do this is either during bootstrap, or during make check, regardles= s of the target. Anyway, the problematic code is still there in GCC 12(see below) so confirm= ed. if (type !=3D CPP_EOF) error ("junk at end of %<#pragma CTABLE_ENTRY%>"); else if (i >=3D ARRAY_SIZE (pru_ctable)) error ("% index %" HOST_WIDE_INT_PRINT "d" " is not valid", i); else if (pru_ctable[i].valid && pru_ctable[i].base !=3D base) error ("redefinition of %", i); else { if (base & 0xff) warning (0, "% base address is not " "a multiple of 256"); pru_ctable[i].base =3D base; pru_ctable[i].valid =3D true; }=