Mercurial > projects > ldc
diff dmd/statement.c @ 510:6aee82889553
Merged DMD 1.034, array operations are not yet implemented ;)
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 14 Aug 2008 06:55:41 +0200 |
parents | 722f5e90c39c |
children | eef8ac26c66c |
line wrap: on
line diff
--- a/dmd/statement.c Thu Aug 14 03:09:26 2008 +0200 +++ b/dmd/statement.c Thu Aug 14 06:55:41 2008 +0200 @@ -1968,8 +1968,10 @@ if (arg->type) arg->type->toCBuffer(buf, arg->ident, hgs); else + { buf->writestring("auto "); buf->writestring(arg->ident->toChars()); - buf->writebyte(';'); + } + buf->writestring(" = "); } condition->toCBuffer(buf, hgs); buf->writebyte(')'); @@ -2041,6 +2043,14 @@ return (ifbody && ifbody->usesEH()) || (elsebody && elsebody->usesEH()); } +int ConditionalStatement::blockExit() +{ + int result = ifbody->blockExit(); + if (elsebody) + result |= elsebody->blockExit(); + return result; +} + void ConditionalStatement::toCBuffer(OutBuffer *buf, HdrGenState *hgs) { condition->toCBuffer(buf, hgs);