From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 469113858D3C; Wed, 20 Apr 2022 08:42:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 469113858D3C From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105307] -fmax-errors truncated for concept diagnostics Date: Wed, 20 Apr 2022 08:42:28 +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: 11.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: cc 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: Wed, 20 Apr 2022 08:42:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105307 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmalcolm at gcc dot gnu.org --- Comment #4 from Richard Biener --- (In reply to Igel from comment #3) > well, quite surely, > > error: 'x' is not a member of 'NoX' > is not the only instance of this problem. >=20 > It seems to me that gcc is not differentiating "normal errors" from > "explanatory errors", and I guess introducing this difference would actua= lly > be somewhat of a larger refactorization. I'm just speculating tho here... The issue is that the diagnostics are not tied together and we stop compila= tion at the Nth 'error' without knowing that explaining diagnostic parts follow. To fix that indeed requires major refactoring as for example to first someh= ow compose the group of diagnostics and separate actual emission (and then compilation termination) from that. A simpler piecemail approach might be to introduce error_start{,_at} and error_end where error_end would then trigger the exiting. In other areas of the compiler there might already be infrastructure to group diagnostics, maybe something can be re-used or generalized there.=