• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Compiler.h
2 2021-01-05 : Igor Pavlov : Public domain */
3 
4 #ifndef __7Z_COMPILER_H
5 #define __7Z_COMPILER_H
6 
7   #ifdef __clang__
8     #pragma clang diagnostic ignored "-Wunused-private-field"
9   #endif
10 
11 #ifdef _MSC_VER
12 
13   #ifdef UNDER_CE
14     #define RPC_NO_WINDOWS_H
15     /* #pragma warning(disable : 4115) // '_RPC_ASYNC_STATE' : named type definition in parentheses */
16     #pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union
17     #pragma warning(disable : 4214) // nonstandard extension used : bit field types other than int
18   #endif
19 
20   #if _MSC_VER >= 1300
21     #pragma warning(disable : 4996) // This function or variable may be unsafe
22   #else
23     #pragma warning(disable : 4511) // copy constructor could not be generated
24     #pragma warning(disable : 4512) // assignment operator could not be generated
25     #pragma warning(disable : 4514) // unreferenced inline function has been removed
26     #pragma warning(disable : 4702) // unreachable code
27     #pragma warning(disable : 4710) // not inlined
28     #pragma warning(disable : 4714) // function marked as __forceinline not inlined
29     #pragma warning(disable : 4786) // identifier was truncated to '255' characters in the debug information
30   #endif
31 
32   #ifdef __clang__
33     #pragma clang diagnostic ignored "-Wdeprecated-declarations"
34     #pragma clang diagnostic ignored "-Wmicrosoft-exception-spec"
35     // #pragma clang diagnostic ignored "-Wreserved-id-macro"
36   #endif
37 
38 #endif
39 
40 #define UNUSED_VAR(x) (void)x;
41 /* #define UNUSED_VAR(x) x=x; */
42 
43 #endif
44