Here's a slightly modified version of code [from this question](https://stackoverflow.com/q/14355629/57428):

```
#pragma warning(default:4716)
int recur(int i) 
{ 
   int result;
   result = (i>1 ? i - recur(i/2) : 3);
   // return intentionally omitted
}

int main()
{
    return recur(0);
}

```

Note that `recur()` omits `return` and so its behavior is undefined. Here's what Visual C++ 10 emits for this code:

```
 316: int main()
 317: {
00403940  push        ecx  
 318:   return recur(0);
00403941  mov         eax,dword ptr [esp]  
 319: }
00403944  pop         ecx  
00403945  ret

```

Yes, I know that in case of undefined behavior anything is permitted. But this code is completely pointless and a compiler is a program, so I wouldn't expect pointless things from it.

How does the compiler manage to emit completely pointless code?