c++ - Forcing an error when a function doesn't explicitly return a value on the deafult return path? -


Is there a way in VC ++ (VSTS 2008), which is to cover a compiler error for the function Which clearly do not return a value on the default return path (or any other quick way to detect them)?

On the same issue, will any function actually return?

I do not have any warning numbers, but you must warn #pragma to apply a special warning Can be used as an error:

Example:

  #pragma Alert (error: 4001)  

The warning will treat 4001 as an error


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

kernel - How to create a "Block device" in Windows -