diff options
author | Tomasz Konojacki <me@xenu.pl> | 2019-04-04 22:39:38 +0200 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-04-05 22:51:00 -0600 |
commit | 6879a07bc8b8e75c35d0e3b765ea718cc1c7aeb2 (patch) | |
tree | 59a3fdded5022da4f20985c5d4dada92078497a7 /perl.h | |
parent | bc035eed7aac5997a56d34b98261cc7a99da4787 (diff) | |
download | perl-6879a07bc8b8e75c35d0e3b765ea718cc1c7aeb2.tar.gz |
implement diagnostics ignore/restore macros for Visual C++
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -448,6 +448,19 @@ #define CLANG_DIAG_IGNORE_STMT(x) CLANG_DIAG_IGNORE(x) NOOP #define CLANG_DIAG_RESTORE_STMT CLANG_DIAG_RESTORE NOOP +#if defined(_MSC_VER) && (_MSC_VER >= 1300) +# define MSVC_DIAG_IGNORE(x) __pragma(warning(push)) \ + __pragma(warning(disable : x)) +# define MSVC_DIAG_RESTORE __pragma(warning(pop)) +#else +# define MSVC_DIAG_IGNORE(x) +# define MSVC_DIAG_RESTORE +#endif +#define MSVC_DIAG_IGNORE_DECL(x) MSVC_DIAG_IGNORE(x) dNOOP +#define MSVC_DIAG_RESTORE_DECL MSVC_DIAG_RESTORE dNOOP +#define MSVC_DIAG_IGNORE_STMT(x) MSVC_DIAG_IGNORE(x) NOOP +#define MSVC_DIAG_RESTORE_STMT MSVC_DIAG_RESTORE NOOP + #define NOOP /*EMPTY*/(void)0 #define dNOOP struct Perl___notused_struct |