Compiler Warning (level 1) C4717 (Windows CE 5.0)

Windows CE 5.0
Send Feedback

'function' : recursive on all control paths, function will cause runtime stack overflow

Every path through a function contains a call to the function. Because there is no way to exit the function without first calling itself recursively, the function will never exit.

The following code demonstrates how this warning would be generated:

int func(int x)
if (x > 1) {
return func(x - 1); // recursive call
else {
int y = func(0) + 1; // recursive call
return y;

void main(){

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.