Index: src/CodeGen/FixMain.cc
===================================================================
--- src/CodeGen/FixMain.cc	(revision 7dc0246d544717a9c2f72678bcf4880ff4a52ff7)
+++ src/CodeGen/FixMain.cc	(revision 24c3b67550eca781abfb52c30ecc1c675eb98ba5)
@@ -39,5 +39,5 @@
 	{
 		if(main_signature) {
-			throw SemanticError("Multiple definition of main routine\n", functionDecl);
+			throw SemanticError(functionDecl, "Multiple definition of main routine\n");
 		}
 		main_signature.reset( functionDecl->clone() );
Index: src/CodeGen/FixNames.cc
===================================================================
--- src/CodeGen/FixNames.cc	(revision 7dc0246d544717a9c2f72678bcf4880ff4a52ff7)
+++ src/CodeGen/FixNames.cc	(revision 24c3b67550eca781abfb52c30ecc1c675eb98ba5)
@@ -118,5 +118,5 @@
 			int nargs = functionDecl->get_functionType()->get_parameters().size();
 			if( !(nargs == 0 || nargs == 2 || nargs == 3) ) {
-				throw SemanticError("Main expected to have 0, 2 or 3 arguments\n", functionDecl);
+				throw SemanticError(functionDecl, "Main expected to have 0, 2 or 3 arguments\n");
 			}
 			functionDecl->get_statements()->get_kids().push_back( new ReturnStmt( new ConstantExpr( Constant::from_int( 0 ) ) ) );
