shouldn't cast(Object)cast(void*)anything work?
Davidl
Davidl at 126.com
Wed Apr 4 16:08:57 PDT 2007
i don't think compiler could eliminate the following :
union __exp
{
Expression _m_exp;
int i;
}
__exp EXP_CANT_INTERPRET
static this()
{
EXP_CANT_INTERPRET.i=1;
}
to :
simply cast(Expression)1;
while in runtime
return cast(Expression)1; would generate literal 1 and retn
and the example use union trick could possibly need to copy a var which
holds the value of 1
and it's strange for the error message goes away when it becomes the first
member ;)
:o because the first member's initializer is the union's default
initializer?
More information about the Digitalmars-d
mailing list