diff --git a/include/cereal/archives/json.hpp b/include/cereal/archives/json.hpp index 60fca1961..102f86e8d 100644 --- a/include/cereal/archives/json.hpp +++ b/include/cereal/archives/json.hpp @@ -68,6 +68,11 @@ namespace cereal #include #include +#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 7) +CEREAL_RAPIDJSON_DIAG_PUSH +CEREAL_RAPIDJSON_DIAG_OFF(implicit-fallthrough) +#endif + namespace cereal { // ###################################################################### @@ -1009,4 +1014,8 @@ CEREAL_REGISTER_ARCHIVE(cereal::JSONOutputArchive) // tie input and output archives together CEREAL_SETUP_ARCHIVE_TRAITS(cereal::JSONInputArchive, cereal::JSONOutputArchive) +#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 7) +CEREAL_RAPIDJSON_DIAG_POP +#endif + #endif // CEREAL_ARCHIVES_JSON_HPP_ diff --git a/include/cereal/external/rapidjson/internal/regex.h b/include/cereal/external/rapidjson/internal/regex.h index 3bfa3ec3e..81c51070f 100644 --- a/include/cereal/external/rapidjson/internal/regex.h +++ b/include/cereal/external/rapidjson/internal/regex.h @@ -29,6 +29,9 @@ CEREAL_RAPIDJSON_DIAG_OFF(implicit-fallthrough) #ifdef __GNUC__ CEREAL_RAPIDJSON_DIAG_PUSH CEREAL_RAPIDJSON_DIAG_OFF(effc++) +#if __GNUC__ >= 7 + CEREAL_RAPIDJSON_DIAG_OFF(implicit-fallthrough) +#endif #endif #ifdef _MSC_VER @@ -694,6 +697,10 @@ CEREAL_RAPIDJSON_NAMESPACE_END CEREAL_RAPIDJSON_DIAG_POP #endif +#ifdef __GNUC__ +CEREAL_RAPIDJSON_DIAG_POP +#endif + #ifdef _MSC_VER CEREAL_RAPIDJSON_DIAG_POP #endif