]>
Commit | Line | Data |
---|---|---|
df5168c4 | 1 | /////////////////////////////////////////////////////////////////////////////// |
233f5738 | 2 | // Name: wx/beforestd.h |
df5168c4 MB |
3 | // Purpose: #include before STL headers |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 07/07/03 | |
df5168c4 | 7 | // Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> |
65571936 | 8 | // Licence: wxWindows licence |
df5168c4 MB |
9 | /////////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | /** | |
12 | Unfortunately, when compiling at maximum warning level, the standard | |
13 | headers themselves may generate warnings -- and really lots of them. So | |
14 | before including them, this header should be included to temporarily | |
15 | suppress the warnings and after this the header afterstd.h should be | |
16 | included to enable them back again. | |
17 | ||
18 | Note that there are intentionally no inclusion guards in this file, because | |
19 | it can be included several times. | |
20 | */ | |
21 | ||
ffbc1990 VZ |
22 | // VC 7.x isn't as bad as VC6 and doesn't give these warnings but eVC (which |
23 | // defines _MSC_VER as 1201) does need to be included as it's VC6-like | |
24 | #if defined(__VISUALC__) && __VISUALC__ <= 1201 | |
76981461 VZ |
25 | // these warning have to be disabled and not just temporarily disabled |
26 | // because they will be given at the end of the compilation of the | |
27 | // current source and there is absolutely nothing we can do about them so | |
28 | // disable them before warning(push) below | |
29 | ||
30 | // 'foo': unreferenced inline function has been removed | |
31 | #pragma warning(disable:4514) | |
32 | ||
33 | // 'function' : function not inlined | |
34 | #pragma warning(disable:4710) | |
35 | ||
36 | // 'id': identifier was truncated to 'num' characters in the debug info | |
37 | #pragma warning(disable:4786) | |
38 | ||
282e8e0c VZ |
39 | // MSVC 5 does not have this |
40 | #if __VISUALC__ > 1100 | |
00ba414f VZ |
41 | // we have to disable (and reenable in afterstd.h) this one because, |
42 | // even though it is of level 4, it is not disabled by warning(push, 1) | |
43 | // below for VC7.1! | |
44 | ||
45 | // unreachable code | |
46 | #pragma warning(disable:4702) | |
47 | ||
282e8e0c VZ |
48 | #pragma warning(push, 1) |
49 | #else // VC 5 | |
c9d59ee7 WS |
50 | // 'expression' : signed/unsigned mismatch |
51 | #pragma warning(disable:4018) | |
282e8e0c | 52 | |
0545fc01 VZ |
53 | // 'identifier' : unreferenced formal parameter |
54 | #pragma warning(disable:4100) | |
55 | ||
c9d59ee7 WS |
56 | // 'conversion' : conversion from 'type1' to 'type2', |
57 | // possible loss of data | |
58 | #pragma warning(disable:4244) | |
282e8e0c | 59 | |
c9d59ee7 WS |
60 | // C++ language change: to explicitly specialize class template |
61 | // 'identifier' use the following syntax | |
62 | #pragma warning(disable:4663) | |
282e8e0c | 63 | #endif |
282e8e0c | 64 | #endif // VC++ < 7 |
df5168c4 | 65 | |
d6f513f8 VS |
66 | /** |
67 | GCC's visibility support is broken for libstdc++ in some older versions | |
68 | (namely Debian/Ubuntu's GCC 4.1, see | |
69 | https://bugs.launchpad.net/ubuntu/+source/gcc-4.1/+bug/109262). We fix it | |
70 | here by mimicking newer versions' behaviour of using default visibility | |
71 | for libstdc++ code. | |
72 | */ | |
73 | #if defined(HAVE_VISIBILITY) && defined(HAVE_BROKEN_LIBSTDCXX_VISIBILITY) | |
74 | #pragma GCC visibility push(default) | |
75 | #endif |