From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 884713857C7D; Wed, 5 Oct 2022 15:00:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 884713857C7D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664982025; bh=qnLP0DO8szpjAVikZoVcGCm8L+MzV2bHDKrkamHRXpY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tmsUKDlucQiT265XqtxJ2ZQJIC6q5z0ozUFeHpZmzill+uZfKGFBkCX9Mi0us+FyF 8jqF31/sC8v+2tNvJwi2/TI0V8QVYMaho/1dGvl6Tb4TOk3Ppn3siq8eGCV+ws4pSV YC3svJA9WKpQ0/L8SoCUFKWoVSmlP9ZkDl2nbBxA= From: "redbeard0531 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/89997] Garbled expression in error message with -fconcepts Date: Wed, 05 Oct 2022 15:00:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 9.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redbeard0531 at gmail dot com 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D89997 --- Comment #6 from Mathias Stearn --- > I think this is probably not concepts-specific, and just another variant = of PR 49152. Perhaps the busted pretty printer is a general problem, but at least in this case I think the fix may be in concepts code. It looks like the error is generated at https://github.com/gcc-mirror/gcc/blob/16e2427f50c208dfe07d07f18009969502c2= 5dc8/gcc/cp/constraint.cc#L3300 (or the similar call 7 lines lower). Given that gcc already prints the sour= ce loc with the invalid expression, I think you can just remove the %qE to imp= rove the diagnostic output. (I don't know the gcc codebase at all, so I could be wrong about this, I just grepped for the string "the required expression")=