[Bug 99] New: superfluous output for failed static asserts
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 10 23:52:07 PDT 2006
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 at digitalmars.com
ReportedBy: thomas-dloop at 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)
--
More information about the Digitalmars-d-bugs
mailing list