Index: src/CodeGen/FixNames.cc
===================================================================
--- src/CodeGen/FixNames.cc	(revision 13de47bcd1133e72e5f8fcdee34f7cbc890ec088)
+++ src/CodeGen/FixNames.cc	(revision aaa1a99a1950364c6bd2925b2f12dd314caccfeb)
@@ -120,5 +120,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", main_signature.get()); 
+				throw SemanticError("Main expected to have 0, 2 or 3 arguments\n", functionDecl); 
 			}
 			functionDecl->get_statements()->get_kids().push_back( new ReturnStmt( noLabels, new ConstantExpr( Constant( new BasicType( Type::Qualifiers(), BasicType::SignedInt ), "0") ) ) );
