]>
Commit | Line | Data |
---|---|---|
df5168c4 MB |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: include/wx/beforestd.h | |
3 | // Purpose: #include before STL headers | |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 07/07/03 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> | |
65571936 | 9 | // Licence: wxWindows licence |
df5168c4 MB |
10 | /////////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | /** | |
13 | Unfortunately, when compiling at maximum warning level, the standard | |
14 | headers themselves may generate warnings -- and really lots of them. So | |
15 | before including them, this header should be included to temporarily | |
16 | suppress the warnings and after this the header afterstd.h should be | |
17 | included to enable them back again. | |
18 | ||
19 | Note that there are intentionally no inclusion guards in this file, because | |
20 | it can be included several times. | |
21 | */ | |
22 | ||
282e8e0c VZ |
23 | // VC 7.x isn't as bad as VC6 and doesn't give these warnings |
24 | #if defined(__VISUALC__) && __VISUALC__ <= 1200 | |
25 | // MSVC 5 does not have this | |
26 | #if __VISUALC__ > 1100 | |
00ba414f VZ |
27 | // we have to disable (and reenable in afterstd.h) this one because, |
28 | // even though it is of level 4, it is not disabled by warning(push, 1) | |
29 | // below for VC7.1! | |
30 | ||
31 | // unreachable code | |
32 | #pragma warning(disable:4702) | |
33 | ||
282e8e0c VZ |
34 | #pragma warning(push, 1) |
35 | #else // VC 5 | |
c9d59ee7 WS |
36 | // 'expression' : signed/unsigned mismatch |
37 | #pragma warning(disable:4018) | |
282e8e0c | 38 | |
c9d59ee7 WS |
39 | // 'conversion' : conversion from 'type1' to 'type2', |
40 | // possible loss of data | |
41 | #pragma warning(disable:4244) | |
282e8e0c | 42 | |
c9d59ee7 WS |
43 | // C++ language change: to explicitly specialize class template |
44 | // 'identifier' use the following syntax | |
45 | #pragma warning(disable:4663) | |
282e8e0c VZ |
46 | #endif |
47 | ||
df5168c4 | 48 | // these warning have to be disabled and not just temporarily disabled |
282e8e0c VZ |
49 | // because they will be given at the end of the compilation of the |
50 | // current source and there is absolutely nothing we can do about them | |
df5168c4 MB |
51 | |
52 | // 'foo': unreferenced inline function has been removed | |
53 | #pragma warning(disable:4514) | |
54 | ||
55 | // 'function' : function not inlined | |
56 | #pragma warning(disable:4710) | |
57 | ||
58 | // 'id': identifier was truncated to 'num' characters in the debug info | |
59 | #pragma warning(disable:4786) | |
282e8e0c | 60 | #endif // VC++ < 7 |
df5168c4 | 61 |