picoc/tests/68_return.c
zik.saleeba f41a1c5f51 Added tests for issue #191.
git-svn-id: http://picoc.googlecode.com/svn/trunk@607 21eae674-98b7-11dd-bd71-f92a316d2d60
2014-03-01 04:28:48 +00:00

35 lines
547 B
C

#include <stdio.h>
void demo_error()
{
int value = 5;
printf("Here's a print statement before quitting.\n");
if(1) {
printf("returning; there should be no further output.\n");
return;
}
printf("This statement should not print, and does not.\n");
switch(value)
{
case 5:
printf("case 5: value = %d\n", value);
break;
case 0:
printf("case 0: value=%d\n", value);
break;
}
printf("This statement also should not and does not print.\n");
return;
}
void main()
{
demo_error();
}