Sign in to follow this  
iamrashmin

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

Recommended Posts

I have converted VC6 project to .Net 2005 VC++. It gives me warning : warning C4717: 'CExcel::PrintLine' : recursive on all control paths, function will cause runtime stack overflow void CExcel::PrintLine( LPCSTR pchText ) { PrintLine( _bstr_t( pchText ) ); } void CExcel::Print( LPCSTR pchText ) { Print( _bstr_t( pchText ) ); } Above functions are working fine VC 6.0. Can any one please help me fix / resolve this issue? Due to this warning, application is not working on .net 2005 VC++.

Share this post


Link to post
Share on other sites
Why is CExcel::PrintLine calling itself? Did you mean to call a global function? Or another function of the same class but with a different prototype? What is that other function's prototype?

Share this post


Link to post
Share on other sites
We've had this warning malfunction in SlimDX as well. I'm going to assume the OP has two other functions with the same name that take a BSTR as an argument, in which case his complaint would be valid. If that's the case, you can use #pragma to disable the warning in that one particular location.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this