December 08, 2005
Bruno Medeiros wrote:

>> i.e. whether the first error should stop the testing, or if it should
>> continue with the other tests too and collect and log a test summary ?
> 
> Hum.. indeed, there are quite some things that could be said about this...

Yes, but for the tests one can write a "callback" to change behaviour:
http://www.digitalmars.com/techtips/unittests.html

Doing the same for DMD requires patching the compiler (at the moment)
So in that regard it would be easier to add it to the GDC compiler...


Hmmm:
Wonder if the rest of the compiler works if one just skips the "exit" ?
(in the "error(format, ...)" routine in the root.c DMD file, that was)

--anders
December 08, 2005
On Thu, 08 Dec 2005 12:26:42 +0000, Bruno Medeiros wrote:

> Derek Parnell wrote:
>> On Wed, 07 Dec 2005 19:45:33 -0500, clayasaurus wrote:
>> 
>> 
>>>This is why I don't use warnings, because I need to 'fix' them if I want to see more. It just isn't worth it, unless you feel a need to fix every single warning you get.
>> 
>> 
>> And I do.
>> 
> For a release, yes, definitely. But during development too?, all the time?

Yep, its one of the standard switches I have in my Build configuration file. The rationale goes something like ... "keeping things tidy at the incremental stage is cheaper and safer than go back to clean up the mess later." It also encourages disciplined coding practice.
-- 
Derek Parnell
Melbourne, Australia
9/12/2005 7:46:33 AM
December 09, 2005
Derek Parnell wrote:
> On Thu, 08 Dec 2005 12:26:42 +0000, Bruno Medeiros wrote:
> 
> 
>>Derek Parnell wrote:
>>
>>>On Wed, 07 Dec 2005 19:45:33 -0500, clayasaurus wrote:
>>>
>>>
>>>
>>>>This is why I don't use warnings, because I need to 'fix' them if I want to see more. It just isn't worth it, unless you feel a need to fix every single warning you get.
>>>
>>>
>>>And I do.
>>>
>>
>>For a release, yes, definitely. But during development too?, all the time?
> 
> 
> Yep, its one of the standard switches I have in my Build configuration
> file. The rationale goes something like ... "keeping things tidy at the
> incremental stage is cheaper and safer than go back to clean up the mess
> later." It also encourages disciplined coding practice.
Well yes, it does, but not for those 2 warning, IMHO.
In fact... I wonder what other warnings does DMD have, besides those two, (to see what I'm missing out)?
... *checking source code* ...
Hum, seems it's only five:

  error("implicit conversion of expression (%s) of type %s to %s can cause loss of data",	toChars(), type->toChars(), t->toChars());
  error("no return at end of function");
  error("array 'length' hides other 'length' name in outer scope");
  s->error("statement is not reachable");
  error("switch statement has no default");

And "unused variable" is not even one of them, which, silly me, was what Tiago started this thread for and I didn't notice until now. :S

-- 
Bruno Medeiros - CS/E student
"Certain aspects of D are a pathway to many abilities some consider to be... unnatural."
1 2 3
Next ›   Last »