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, compilation warnings for implicit-falltrough on gcc7.1 #427

Closed
wants to merge 0 commits into from
Closed

Conversation

furkanusta
Copy link
Contributor

After checking external/rapidjson/internal/regex.h, I've decided to copy same pragmas instead of relying on the inclusion of regex.h because regex.h pops back the pragmas at the end of the file (although not for gcc), and thus it would be better to change these pragmas per-file basis.

It passes all the tests with gcc7.1.1 on my machine and a simple test code generates no warnings on clang4.0

However whole project fails to build on clang4.0 giving an unrelated error. I will check it as well and send a pull request if I can.

And a suggestion: maybe we can define a macro like CEREAL_FALLTHROUGH that expands to C++17 counterpart if it is defined and to nothing otherwise.

@furkanusta
Copy link
Contributor Author

Ignore this patch for now, as it seems that this one fixes the problem for gcc7.1 but gives an error for previous versions since implicit-fallthrough is not available on them. I'll fix it and send an another patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant