Skip to content

Commit

Permalink
PR #1651: Implement ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARN…
Browse files Browse the repository at this point in the history
…ING for MSVC compiler

Imported from GitHub PR #1651

Merge 6c02d45 into 9a61b00

Merging this change closes #1651

COPYBARA_INTEGRATE_REVIEW=#1651 from pps83:ms-pragma-warn 6c02d45
PiperOrigin-RevId: 626108518
Change-Id: Idb00aca9bafbca92b231bdff7ef8c220948f134c
  • Loading branch information
pps83 authored and copybara-github committed Apr 18, 2024
1 parent 192e959 commit 7efc308
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions absl/base/attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,11 @@
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
#define ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING \
_Pragma("GCC diagnostic pop")
#elif defined(_MSC_VER)
#define ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING \
_Pragma("warning(push)") _Pragma("warning(disable: 4996)")
#define ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING \
_Pragma("warning(pop)")
#else
#define ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING
#define ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING
Expand Down

0 comments on commit 7efc308

Please sign in to comment.