[Bug c++/105307] -fmax-errors truncated for concept diagnostics

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 20 08:42:28 GMT 2022


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmalcolm at gcc dot gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(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.
> 
> It seems to me that gcc is not differentiating "normal errors" from
> "explanatory errors", and I guess introducing this difference would actually
> 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 compilation
at the Nth 'error' without knowing that explaining diagnostic parts follow.

To fix that indeed requires major refactoring as for example to first somehow
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.


More information about the Gcc-bugs mailing list