Jump to content
  • Advertisement
Sign in to follow this  
iamrashmin

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

This topic is 3732 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
You keep calling the function in which you are, it's an infinite loop, which will cause a stack overflow.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!