header.hpp 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright Andrey Semashev 2020.
  3. * Distributed under the Boost Software License, Version 1.0.
  4. * (See accompanying file LICENSE_1_0.txt or copy at
  5. * http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. #include <boost/config.hpp>
  8. #if !defined(BOOST_ATOMIC_ENABLE_WARNINGS)
  9. #if defined(BOOST_MSVC)
  10. #pragma warning(push, 3)
  11. // 'm_A' : class 'A' needs to have dll-interface to be used by clients of class 'B'
  12. #pragma warning(disable: 4251)
  13. // non dll-interface class 'A' used as base for dll-interface class 'B'
  14. #pragma warning(disable: 4275)
  15. // 'this' : used in base member initializer list
  16. #pragma warning(disable: 4355)
  17. // 'int' : forcing value to bool 'true' or 'false' (performance warning)
  18. #pragma warning(disable: 4800)
  19. // unreferenced formal parameter
  20. #pragma warning(disable: 4100)
  21. // conditional expression is constant
  22. #pragma warning(disable: 4127)
  23. // default constructor could not be generated
  24. #pragma warning(disable: 4510)
  25. // copy constructor could not be generated
  26. #pragma warning(disable: 4511)
  27. // assignment operator could not be generated
  28. #pragma warning(disable: 4512)
  29. // function marked as __forceinline not inlined
  30. #pragma warning(disable: 4714)
  31. // decorated name length exceeded, name was truncated
  32. #pragma warning(disable: 4503)
  33. // declaration of 'A' hides previous local declaration
  34. #pragma warning(disable: 4456)
  35. // declaration of 'A' hides global declaration
  36. #pragma warning(disable: 4459)
  37. // 'X': This function or variable may be unsafe. Consider using Y instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  38. #pragma warning(disable: 4996)
  39. // 'A' : multiple assignment operators specified
  40. #pragma warning(disable: 4522)
  41. // unary minus operator applied to unsigned type, result still unsigned
  42. #pragma warning(disable: 4146)
  43. // frame pointer register 'ebx' modified by inline assembly code
  44. #pragma warning(disable: 4731)
  45. // alignment is sensitive to packing
  46. #pragma warning(disable: 4121)
  47. // 'struct_name' : structure was padded due to __declspec(align())
  48. #pragma warning(disable: 4324)
  49. #elif defined(BOOST_GCC) && BOOST_GCC >= 40600
  50. #pragma GCC diagnostic push
  51. // unused parameter 'arg'
  52. #pragma GCC diagnostic ignored "-Wunused-parameter"
  53. // missing initializer for member var
  54. #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
  55. #elif defined(BOOST_CLANG)
  56. #pragma clang diagnostic push
  57. // unused parameter 'arg'
  58. #pragma clang diagnostic ignored "-Wunused-parameter"
  59. // missing initializer for member var
  60. #pragma clang diagnostic ignored "-Wmissing-field-initializers"
  61. #endif
  62. #endif // !defined(BOOST_ATOMIC_ENABLE_WARNINGS)