Compiler Warning (level 4) C4718 (Windows CE 5.0)

Windows CE 5.0
Send Feedback

'function call' : recursive call has no side effects, deleting

A function contains a recursive call, but otherwise has no side effects. A call to this function is being deleted. The correctness of the program is not affected, but the behavior is. Whereas leaving the call in could result in a runtime stack overflow exception, deleting the call removes that possibility.

The following code generates C4718,

// compile with optimizations
int func(int x)
if (x > 1)
return func(x - 1); // recursive call
return x;

void func2(void)
func(10);  // deleted; no side effects and return value used

void main() {

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.