[Issue 3488] Segfault(expression.c): enum declared with struct static initializer
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 23 00:23:23 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3488
--- Comment #4 from Don <clugdbug at yahoo.com.au> 2009-11-23 00:23:22 PST ---
PATCH: With the demise of struct initializers, it's not worth fixing properly.
But DsymbolExp::semantic() should check for a null value anyway (it checks in
other places in expression.c). This would prevent the segfault.
expression.c line 2306 (svn 267):
if ((v->storage_class & STCmanifest) && v->init)
{
e = v->init->toExpression();
+ if (!e)
+ { error("cannot make expression out of initializer for %s",
v->toChars());
+ e = new ErrorExp();
+ }
e->semantic(sc);
return e;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list