diff dmd/func.c @ 215:a58d8f4b84df trunk

[svn r231] Changed: warnings are no longer treated as an error. Added some comments and cleaned up CallExp::toElem a tiny bit. Fixed: struct literals always reported inplace assignment even if they allocated a temporary. Fixed: passing stuff to a D-style vararg which did inplace assignment was generated suboptimal code.
author lindquist
date Tue, 03 Jun 2008 13:51:09 +0200
parents 1856c62af24b
children d61ce72c39ab
line wrap: on
line diff
--- a/dmd/func.c	Fri May 30 19:32:56 2008 +0200
+++ b/dmd/func.c	Tue Jun 03 13:51:09 2008 +0200
@@ -308,7 +308,7 @@
 
 #if V2
 		if (!isOverride() && global.params.warnings)
-		    error("overrides base class function %s, but is not marked with 'override'", fdv->toPrettyChars());
+		    warning("%s: overrides base class function %s, but is not marked with 'override'", locToChars() fdv->toPrettyChars());
 #endif
 
 		if (fdv->toParent() == parent)
@@ -1056,8 +1056,7 @@
 		    {   Expression *e;
 
 			if (global.params.warnings)
-			{   fprintf(stdmsg, "warning - ");
-			    error("no return at end of function");
+			{   warning("%s: no return at end of function", locToChars());
 			}
 
 			if (global.params.useAssert &&