Hi everybody,
I have a program which use <vector>. When I compile the program the vc.net
2003 compiler always complains that:
......
Compiling resources...
Linking...
Generating code
c:\program files\microsoft visual studio .net 2003\vc7\include\vector(834) :
warning C4702: unreachable code
c:\program files\microsoft visual studio .net 2003\vc7\include\vector(856) :
warning C4702: unreachable code
Finished generating code
Does anyone know what's wrong. and how could i deal with it. I like to set
the compile warning level to be 4 so that I could watch all that happened.
Carl Daniel [VC++ MVP] - 31 Jan 2005 06:47 GMT
> Hi everybody,
> I have a program which use <vector>. When I compile the program the
[quoted text clipped - 13 lines]
> to set the compile warning level to be 4 so that I could watch all
> that happened.
There's no guarantee that the STL headers compile clean at /W4. In this
case, there's code that's not reachable - presumably it'd be reachable if
you instantiated the vector on some other type.
-cd