Mercurial > projects > ldc
diff dmd/func.c @ 1103:b30fe7e1dbb9
- Updated to DMD frontend 1.041.
- Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Thu, 12 Mar 2009 20:37:27 +0100 |
parents | 31bbc7f3b817 |
children | eeb8b95ea92e |
line wrap: on
line diff
--- a/dmd/func.c Thu Mar 12 14:08:57 2009 +0100 +++ b/dmd/func.c Thu Mar 12 20:37:27 2009 +0100 @@ -337,8 +337,8 @@ error("cannot override final function %s", fdv->toPrettyChars()); #if DMDV2 - if (!isOverride() && global.params.warnings) - warning("%s: overrides base class function %s, but is not marked with 'override'", locToChars() fdv->toPrettyChars()); + if (!isOverride()) + warning(loc, "overrides base class function %s, but is not marked with 'override'", fdv->toPrettyChars()); #endif if (fdv->toParent() == parent) @@ -1083,9 +1083,7 @@ if (offend) { Expression *e; - if (global.params.warnings) - { warning("%s: no return at end of function", locToChars()); - } + warning(loc, "no return at end of function"); if (global.params.useAssert && !global.params.useInline) @@ -1095,7 +1093,7 @@ e = new AssertExp( endloc, new IntegerExp(0), - new StringExp(loc, "missing return expression") + new StringExp(loc, (char *)"missing return expression") ); } else @@ -2165,7 +2163,7 @@ enum TOK tok, ForeachStatement *fes) : FuncDeclaration(loc, endloc, NULL, STCundefined, type) { - char *id; + const char *id; if (fes) id = "__foreachbody"; @@ -2310,7 +2308,7 @@ char *CtorDeclaration::toChars() { - return "this"; + return (char *)"this"; } int CtorDeclaration::isVirtual() @@ -2652,7 +2650,7 @@ ad = parent->isAggregateDeclaration(); if (!ad) { - error("invariants only are for struct/union/class definitions"); + error("invariants are only for struct/union/class definitions"); return; } else if (ad->inv && ad->inv != this)