[Bug other/100695] Format decoder, quoting in 'dump_printf' etc.

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 9 17:48:09 GMT 2021


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
As an example, can be reproduced e.g. on
./cc1 -quiet -fopt-info-omp-note --param=openacc-privatization=noisy -fopenacc
-O2 .../gcc/testsuite/c-c++-common/goacc/privatization-1-routine_gang-loop.c
when that omp-low.c %<%T%> is changed to %qT.

>From what I see, the quotes for %< are emitted using:
        case '<':
          {
            obstack_grow (&buffer->chunk_obstack,
                          open_quote, strlen (open_quote));
            const char *colorstr
              = colorize_start (pp_show_color (pp), "quote");
            obstack_grow (&buffer->chunk_obstack, colorstr, strlen (colorstr));
but for %qX using:
      if (quote)
        pp_begin_quote (pp, pp_show_color (pp));
and similarly for the closing quote.
In the case of dump_print_*, the characters go into chunk_obstack, while e.g.
what '%T' provides goes to the stashed items or where.


More information about the Gcc-bugs mailing list