about vector

G

Guest

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.
 
C

Carl Daniel [VC++ MVP]

mestupid said:
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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top