public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99288] New: xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED
@ 2021-02-26 14:15 roland.illig at gmx dot de
  2021-02-26 14:21 ` [Bug c/99288] " roland.illig at gmx dot de
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: roland.illig at gmx dot de @ 2021-02-26 14:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99288
           Summary: xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: roland.illig at gmx dot de
  Target Milestone: ---

gcse.c says:
>     warning (OPT_Wdisabled_optimization,
> 	       "%s: %d basic blocks and %d registers; "
> 	       "increase %<--param max-gcse-memory%> above "
> 	       HOST_WIDE_INT_PRINT_UNSIGNED,
> 	       pass, n_basic_blocks_for_fn (cfun), max_reg_num (),
> 	       memory_request / 1024);

HOST_WIDE_INT_PRINT_UNSIGNED is a host-dependent string literal that is
resolved by the C preprocessor. When xgettext scans the source code, it does
not notice this and generates:

> msgid ""
> "%s: %d basic blocks and %d registers; increase %<--param max-gcse-memory%> "
> "above "

The placeholder at the end of the sentence is missing, which means that this
message cannot be translated into other languages right now.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c/99288] xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED
  2021-02-26 14:15 [Bug c/99288] New: xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED roland.illig at gmx dot de
@ 2021-02-26 14:21 ` roland.illig at gmx dot de
  2021-02-26 16:22 ` [Bug other/99288] " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: roland.illig at gmx dot de @ 2021-02-26 14:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Roland Illig <roland.illig at gmx dot de> ---
same in ipa-devirt.c:
> inform (this_enum.vals[j].locus,
>         "name %qs is defined to " HOST_WIDE_INT_PRINT_DEC

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug other/99288] xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED
  2021-02-26 14:15 [Bug c/99288] New: xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED roland.illig at gmx dot de
  2021-02-26 14:21 ` [Bug c/99288] " roland.illig at gmx dot de
@ 2021-02-26 16:22 ` jakub at gcc dot gnu.org
  2021-02-26 16:24 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-26 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
          Component|c                           |other
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-02-26

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug other/99288] xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED
  2021-02-26 14:15 [Bug c/99288] New: xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED roland.illig at gmx dot de
  2021-02-26 14:21 ` [Bug c/99288] " roland.illig at gmx dot de
  2021-02-26 16:22 ` [Bug other/99288] " jakub at gcc dot gnu.org
@ 2021-02-26 16:24 ` jakub at gcc dot gnu.org
  2021-02-27  9:45 ` cvs-commit at gcc dot gnu.org
  2021-03-01  9:00 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-26 16:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50262
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50262&action=edit
gcc11-pr99288.patch

Untested fix.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug other/99288] xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED
  2021-02-26 14:15 [Bug c/99288] New: xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED roland.illig at gmx dot de
                   ` (2 preceding siblings ...)
  2021-02-26 16:24 ` jakub at gcc dot gnu.org
@ 2021-02-27  9:45 ` cvs-commit at gcc dot gnu.org
  2021-03-01  9:00 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-27  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:652623f7c68594b1825a333bf8e83e87d1c3f523

commit r11-7426-g652623f7c68594b1825a333bf8e83e87d1c3f523
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat Feb 27 10:43:28 2021 +0100

    gcse, ipa-devirt: Use %wd/%wu instead of HOST_WIDE_INT_PRINT* in
diagnostics [PR99288]

    HOST_WIDE_INT_PRINT* in the string literals of warning/error/inform etc.
    make those messages non-translatable, and we have a perfectly fine
    alternative when not using system *printf - %w{d,u}.

    2021-02-27  Jakub Jelinek  <jakub@redhat.com>

            PR other/99288
            * gcse.c (gcse_or_cprop_is_too_expensive): Use %wu instead of
            HOST_WIDE_INT_PRINT_UNSIGNED in warning format string.
            * ipa-devirt.c (ipa_odr_read_section): Use %wd instead of
            HOST_WIDE_INT_PRINT_DEC in inform format string.  Fix comment
            typos.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug other/99288] xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED
  2021-02-26 14:15 [Bug c/99288] New: xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED roland.illig at gmx dot de
                   ` (3 preceding siblings ...)
  2021-02-27  9:45 ` cvs-commit at gcc dot gnu.org
@ 2021-03-01  9:00 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-01  9:00 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-01  9:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 14:15 [Bug c/99288] New: xgettext does not get HOST_WIDE_INT_PRINT_UNSIGNED roland.illig at gmx dot de
2021-02-26 14:21 ` [Bug c/99288] " roland.illig at gmx dot de
2021-02-26 16:22 ` [Bug other/99288] " jakub at gcc dot gnu.org
2021-02-26 16:24 ` jakub at gcc dot gnu.org
2021-02-27  9:45 ` cvs-commit at gcc dot gnu.org
2021-03-01  9:00 ` rguenth at gcc dot gnu.org

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).