Quality of errors in DMD

Laeeth Isharc via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 6 02:05:56 PDT 2016


On Monday, 5 September 2016 at 15:55:16 UTC, Dominikus Dittes 
Scherkl wrote:
> On Sunday, 4 September 2016 at 20:14:37 UTC, Walter Bright 
> wrote:
>> On 9/4/2016 10:56 AM, David Nadlinger wrote:
>> The bug report I need is the assert location, and a test case 
>> that causes it. Users do not need to supply any other 
>> information.
>
> So, if we assume the user cannot debug if he hit an compiler 
> bug, I as a compiler developer would at least like to receive a 
> report containing a simple number, to identify which of the 830 
> assert(0)'s in the code that I deemed to be unreachable was 
> actually hit.
>
> Because even if I don't receive a reduced testcase, I have a 
> strong hint what assumption I should re-think, now that I know 
> that it is effectively NOT unreachable.
>
> Could we agree so far?
>
> SO what problem would it be to give the assert(0)'s a number 
> each and print out a message:
> "Compiler bug: assert #xxx was hit, please send a bug report"
> ?

I wonder what people think of opt in automatic statistic 
collecting.  Not a substitute for a bug report, as one doesn't 
want source code being shipped off, but suppose a central server 
at dlang.org tracks internal compiler errors for those who have 
opted in. At least it will be more obvious more quickly which 
parts of code seem to be asserting.



More information about the Digitalmars-d mailing list