Test for switch with return inside a case.
git-svn-id: http://picoc.googlecode.com/svn/trunk@505 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
ab677a0670
commit
b6a760e554
22
tests/47_switch_return.c
Normal file
22
tests/47_switch_return.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <stdio.h>
|
||||
|
||||
void fred(int x)
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
case 1: printf("1\n"); return;
|
||||
case 2: printf("2\n"); break;
|
||||
case 3: printf("3\n"); return;
|
||||
}
|
||||
|
||||
printf("out\n");
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
fred(1);
|
||||
fred(2);
|
||||
fred(3);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue