Ice 3.7 C++11 API Reference
Loading...
Searching...
No Matches
DisableWarnings.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4
5#ifndef ICE_UTIL_DISABLEWARNINGS_H
6#define ICE_UTIL_DISABLEWARNINGS_H
7
8//
9// This header file disables various compiler warnings that we don't want.
10//
11// IMPORTANT: Do *not* include this header file in another public header file!
12// Doing this may potentially disable the warnings in the source
13// code of our customers, which would be bad. Only include this
14// header file in Ice *source* files!
15//
16
17//
18// Microsoft Visual C++
19//
20#if defined(_MSC_VER)
21# define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated
22# pragma warning(disable:4996) // C4996 '<function>' was declared deprecated
23# pragma warning(disable:4800) // C4800 forcing value to bool 'true' or 'false' (performance warning)
24
25# if (_MSC_VER < 1700)
26# pragma warning(disable:4355) // C4355 'this' : used in base member initializer list
27# endif
28#endif
29
30//
31// GCC
32//
33#if defined(__GNUC__)
34# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
35#endif
36
37//
38// Clang
39//
40#if defined(__clang__)
41# pragma clang diagnostic ignored "-Wdeprecated-declarations"
42#endif
43
44#endif