BenVim / rapidjson

Automatically exported from code.google.com/p/rapidjson
MIT License
1 stars 0 forks source link

Add tautological constant out of range warning silencer #92

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Please add the following code below the MSVC warning silencer:

#ifdef __clang__
#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
#endif

So, instead of
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4127) // conditional expression is constant
#endif

it should be written:

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4127) // conditional expression is constant
#endif

#ifdef __clang__
#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
#endif

This helps when using -Werror flag with clang.

Original issue reported on code.google.com by DodoEnte...@gmail.com on 1 Oct 2013 at 9:41

GoogleCodeExporter commented 8 years ago
We have turned on -Werror -Wall -Wextra -Weffc++ and fixes all warnings in 
https://github.com/miloyip/rapidjson/pull/40

This has been verified in continuous integration that gcc/clang passed the 
compilation.
https://travis-ci.org/miloyip/rapidjson/builds/28986504

Thank you. 

Original comment by milo...@gmail.com on 3 Jul 2014 at 1:16

GoogleCodeExporter commented 8 years ago

Original comment by milo...@gmail.com on 3 Jul 2014 at 1:17