Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #416, Implicit falltrough warning on GCC7.1 (Re-sending) #432

Merged
merged 3 commits into from
Sep 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions include/cereal/archives/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ namespace cereal
#include <vector>
#include <string>

#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 7)
CEREAL_RAPIDJSON_DIAG_PUSH
CEREAL_RAPIDJSON_DIAG_OFF(implicit-fallthrough)
#endif

namespace cereal
{
// ######################################################################
Expand Down Expand Up @@ -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_
7 changes: 7 additions & 0 deletions include/cereal/external/rapidjson/internal/regex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down