[Bug 99] superfluous output for failed static asserts

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 1 03:24:31 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=99





------- Comment #1 from clugdbug at yahoo.com.au  2006-06-01 05:24 -------
This seems to be fixed. It works OK in DMD 0.158 Windows, and the bad line in
staticassert.c is gone. Please confirm.

(In reply to comment #0)
> == source.d ==
> int i;
> static assert(i);
> 
> >dmd -c source.d
> source.d(2): static assert  (i) is not evaluatable at compile time
> i
> 
> Note the superfluous i in the second line.
> 
> Cause:
> diff -urBb /opt/dmd/0.151/src/dmd/staticassert.c
> /opt/dmd/0.153/src/dmd/staticassert.c
> --- /opt/dmd/0.151/src/dmd/staticassert.c
> +++ /opt/dmd/0.153/src/dmd/staticassert.c
> @@ -51,7 +51,10 @@
>      if (e->isBool(FALSE))
>         error("(%s) is false", exp->toChars());
>      else if (!e->isBool(TRUE))
> +    {
>         error("(%s) is not evaluatable at compile time", exp->toChars());
> +printf("%s\n", e->toChars());
> +    }
>  }
> 
>  int StaticAssert::oneMember(Dsymbol **ps)
> 


-- 




More information about the Digitalmars-d-bugs mailing list