[LLVMdev] LLVM 2.1 with VC++

Hartmut Kaiser hartmut.kaiser at gmail.com
Wed Nov 7 10:46:10 PST 2007


Jaap, 

> > Also, I'd like to suggest adding the following to config.h, to 
> > eliminate the spurious deprecation warnings:
> >
> > #define _CRT_SECURE_NO_WARNINGS
> > #define _SCL_SECURE_NO_WARNINGS
> > #define _CRT_NONSTDC_NO_WARNINGS
> > 
> > > And moving #include "llvm/Config/config.h" in all the files above 
> > > any other includes, so those will have the proper effect.
> 
> Can we guard those defines like so?
>  
> #if defined _MSC_VER && _MSC_VER >= 1300
>     #if !defined _CRT_SECURE_NO_WARNINGS
>         #define _CRT_SECURE_NO_WARNINGS
>     #endif
>     #if !defined _SCL_SECURE_NO_WARNINGS
>         #define _SCL_SECURE_NO_WARNINGS
>     #endif  
>     #if !defined _CRT_NONSTDC_NO_WARNINGS
>         #define _CRT_NONSTDC_NO_WARNINGS
>     #endif
> #endif
> 
> That way I don't get a warning when I include an LLVM header 
> in a file that already happens to define these.

Currently these defines are done inside the VC8 project files, so no harm
should be done for you.

Regards Hartmut





More information about the llvm-dev mailing list