From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 702FF3851C2B; Thu, 20 May 2021 08:11:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 702FF3851C2B From: "tschwinge at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/100695] New: Format decoder, quoting in 'dump_printf' etc. Date: Thu, 20 May 2021 08:11:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: tschwinge at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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, 20 May 2021 08:11:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100695 Bug ID: 100695 Summary: Format decoder, quoting in 'dump_printf' etc. Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: dmalcolm at gcc dot gnu.org Target Milestone: --- For user-visible '-fopt-info' diagnostics ('dump_printf' etc.), I'm trying = to pretty-print a TREE DECL, using the '%T' format code. As in other compiler diagnostics, I'd like the output to be quoted, so I tried using '%qT' but t= hat prints the same as '%T' (unexpected?). Using '%<%T%>' prints the desired output -- but GCC bootstrap doesn't like that one: [...]/gcc/omp-low.c:10171:33: error: =E2=80=98T=E2=80=99 conversion use= d within a quoted sequence [-Werror=3Dformat=3D] 10171 | "variable %<%T%> ", decl); | ^ I'll work around that, but something seems inconsistent here?=