Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pch_warnings.h
Go to the documentation of this file.
1 #ifndef INCLUDED_PCH_WARNINGS
2 #define INCLUDED_PCH_WARNINGS
3 
4 #include "lib/sysdep/compiler.h" // MSC_VERSION
5 
6 #if MSC_VERSION
7 // .. unimportant but not entirely senseless W4
8 # pragma warning(disable:4201) // nameless struct (Matrix3D)
9 # pragma warning(disable:4244) // conversion from uintN to uint8
10 // .. always disabled W4
11 # pragma warning(disable:4103) // alignment changed after including header (boost has #pragma pack/pop in separate headers)
12 # pragma warning(disable:4127) // conditional expression is constant; rationale: see STMT in lib.h.
13 # pragma warning(disable:4324) // structure was padded due to __declspec(align())
14 # pragma warning(disable:4351) // yes, default init of array entries is desired
15 # pragma warning(disable:4355) // 'this' used in base member initializer list
16 # pragma warning(disable:4718) // recursive call has no side effects, deleting
17 # pragma warning(disable:4786) // identifier truncated to 255 chars
18 # pragma warning(disable:4996) // function is deprecated
19 // .. VS2005 code analysis (very frequent ones)
20 # if MSC_VERSION >= 1400
21 # pragma warning(disable:6011) // dereferencing NULL pointer
22 # pragma warning(disable:6246) // local declaration hides declaration of the same name in outer scope
23 # pragma warning(disable:6326) // potential comparison of a constant with another constant
24 # pragma warning(disable:6334) // sizeof operator applied to an expression with an operator might yield unexpected results
25 # endif
26 // .. Intel-specific
27 # if ICC_VERSION
28 # pragma warning(disable:383) // value copied to temporary, reference to temporary used
29 # pragma warning(disable:981) // operands are evaluated in unspecified order
30 # pragma warning(disable:1418) // external function definition with no prior declaration (raised for all non-static function templates)
31 # pragma warning(disable:1572) // floating-point equality and inequality comparisons are unreliable
32 # pragma warning(disable:1684) // conversion from pointer to same-sized integral type
33 # pragma warning(disable:1786) // function is deprecated (disabling 4996 isn't sufficient)
34 # pragma warning(disable:2415) // variable of static storage duration was declared but never referenced (raised by Boost)
35 # endif
36 // .. disabled by default in W4, ENABLE them
37 # pragma warning(default:4062) // enumerator is not handled
38 # pragma warning(default:4254) // [bit field] conversion, possible loss of data
39 # pragma warning(default:4265) // class has virtual functions, but destructor is not virtual
40 # pragma warning(default:4296) // [unsigned comparison vs. 0 =>] expression is always false
41 # pragma warning(default:4545 4546 4547 4549) // ill-formed comma expressions; exclude 4548 since _SECURE_SCL triggers it frequently
42 # pragma warning(default:4557) // __assume contains effect
43 //# pragma warning(default:4710) // function not inlined (often happens in STL)
44 # pragma warning(default:4836) // local types or unnamed types cannot be used as template arguments
45 # pragma warning(default:4905) // wide string literal cast to LPSTR
46 # pragma warning(default:4906) // string literal cast to LPWSTR
47 # pragma warning(default:4928) // illegal copy-initialization; more than one user-defined conversion has been implicitly applied
48 # pragma warning(default:4946) // reinterpret_cast used between related classes
49 // .. disabled by default in W4, leave them that way
50 //# pragma warning(default:4191) // unsafe conversion (false alarms for function pointers)
51 //# pragma warning(default:4263) // member function does not override any base class virtual member function (happens in GUI)
52 //# pragma warning(default:4555) // expression has no effect (triggered by STL unused)
53 //# pragma warning(default:4619) // #pragma warning: there is no [such] warning number (false alarms in STL)
54 //# pragma warning(default:4668) // not defined as a preprocessor macro, replacing with '0' (frequent in Windows)
55 #endif
56 
57 #endif // #ifndef INCLUDED_PCH_WARNINGS