[LLVMdev] LLVM 2.1 with VC++
Jaap Suter
llvm at jaapsuter.com
Wed Nov 7 10:14:28 PST 2007
> 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.
Thanks,
Jaap Suter
More information about the llvm-dev
mailing list