fixing exit_statement_c: produce 'break' instead of 'exit(0); (Thanks to Manuele)
authorMario de Sousa <msousa@fe.up.pt>
Tue, 05 Apr 2011 14:24:07 +0100
changeset 281 686fa44e3832
parent 280 69a307407f7b
child 282 871edf12fe64
fixing exit_statement_c: produce 'break' instead of 'exit(0); (Thanks to Manuele)
stage4/generate_c/generate_c_st.cc
--- a/stage4/generate_c/generate_c_st.cc	Tue Apr 05 14:17:16 2011 +0100
+++ b/stage4/generate_c/generate_c_st.cc	Tue Apr 05 14:24:07 2011 +0100
@@ -1064,7 +1064,7 @@
   return NULL;
 }
 void *visit(exit_statement_c *symbol) {
-  s4o.print("exit(0)");
+  s4o.print("break");
   return NULL;
 }