How DMD's -w *Prevents* Me From Seeing My Warnings

Don nospam at nospam.com
Sun Feb 14 19:02:19 PST 2010


strtr wrote:
> or: Why does dmd keep on crashing on my code :)
> (I blame it on the average D programming; they don't write enough crappy code ) 
> 
> After reading the -w post I tried using the -w switch again and it also prevents me from seeing all my warning, but for a different reason : it crashes dmd :(
Oh man, you are the Crash Meister!
> 
> Before crashing a few correct warnings are shown :
> warning - tests.d(232): Error: implicit conversion of expression (i1) of type uint to ubyte can cause loss of data
> 
> Somehow I used size_t like this:
> struct S {
>   ubyte[4] ub;
>   void opIndex(size_t i1, size_t i2, size_t i3, size_t i4) {
>     ub[0] = i1;
> ...
> }
> I have no clue as to why I put size_t there but replacing them with ubyte seems to fix the crashing problem. 
> 
> I can't replicate the crash in something small using only the struct or something  :(
> Somehow it only works when at least twenty modules are imported in (indirectly) and a lot of them have circular dependencies.
> 


More information about the Digitalmars-d-learn mailing list