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

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -