[Gc] Re: Compilation warnings with VC++ 2008

Christophe Meessen meessen at cppm.in2p3.fr
Sat Aug 23 04:44:40 PDT 2008

When trying to compile my project, the new warning showed up in my program.

I solved the problem by adding -EHsc option in the compilation command
line of gc library and by adding #include <stdexcept> at the top of the
gc_cpp.h just after #include "gc.h". I guess it is has the effect to
preload windows new operator definition.

The EFsc tells the compiler that exception are used. It is not set when
compiling with NT_STATIC_THREADS_MAKEFILE. Here is the modified line in
the file

    $(cc) $(cdebug) $(cflags) $(cvarsmt) -EHsc -Iinclude

You all see the change to get rid of warnings regarding use of unsafe c

It would be good to check this routines because they may indeed expose
to buffer overflows and nasty things like that.

More information about the Gc mailing list