www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Bug 99] New: superfluous output for failed static asserts

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=99

           Summary: superfluous output for failed static asserts
           Product: D
           Version: 0.153
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: trivial
          Priority: P4
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: thomas-dloop kuehne.cn


== 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) --
Apr 10 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=99






This seems to be fixed. It works OK in DMD 0.158 Windows, and the bad line in
staticassert.c is gone. Please confirm.


 == 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)
--
Jun 01 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=99


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Superfluous printf removed.


-- 
Jun 01 2006