Index: src/CodeGen/CodeGenerator.cpp
===================================================================
--- src/CodeGen/CodeGenerator.cpp	(revision b6f2e7abcc170946c8758bcf25e0848b57d5f213)
+++ src/CodeGen/CodeGenerator.cpp	(revision 1cd28391383d23e6aebd5fe961764d41dbd475bf)
@@ -680,10 +680,27 @@
 	extension( expr );
 	output << "(";
-	if ( expr->result->isVoid() ) {
-		output << "(void)";
-	} else {
-		output << "(";
+	switch ( expr->kind ) {
+	case ast::CCast:
+		if ( expr->result->isVoid() ) {
+			output << "(void)";
+		} else {
+			output << "(";
+			output << genType( expr->result, "", options );
+			output << ")";
+		}
+		break;
+	case ast::CoerceCast:
+		assertf( ast::CoerceCast != expr->kind, "Coercion cast is not implemented." );
+		// And likely shouldn't reach code generation when it is implemented.
+		break;
+	case ast::ReturnCast:
+		// This should be invisible in the resulting C code.
+		// Can we insert a check here?
+		//assert( ResolvExpr::typesCompatable(???) );
+		if ( options.genC ) break;
+		output << "(return ";
 		output << genType( expr->result, "", options );
 		output << ")";
+		break;
 	}
 	expr->arg->accept( *visitor );
