-
Notifications
You must be signed in to change notification settings - Fork 803
Consider using hardened coding standards #17
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
Comments
I suppose these are worth considering, probably in decreasing priority: Wextra, Wshadow, pedantic. For pedantic I don't know if we can make this happen without decreasing the usability of the library. Consider the private access violation that pedantic throws, which is because has_member_serialize_impl uses cereal::access to get access to the private serialization functions. The way to suppress this error is to make has_member_serialize_impl a friend, but this is too cumbersome to do (and would apply to others in traits as well). If there is a better solution to this problem than supporting pedantic would not be an issue. |
A few warnings from that combination come from the externals, so it would likely need some upstream patches to those as well? |
Yes, probably. |
See issue #17 Somewhere along the way we've also broken our ability to compile with GCC 4.7.3. We'll have to decide if we care about supporting 4.7.3 or not. The changes that break this are: -there is no emplace in std::map (or related) in 4.7.3 -there are some enable_ifs in rapidjson's writer.h that are always false (which is fine), but GCC 4.7.3 doesn't like this
I should mention that a vast majority of these changes have to be made on our external libs. They'll probably stay more or less locked down unless people find issues with them or we feel sufficient reason to upgrade them. |
As a consequence of compiling with -pedantic, there are a few macros that no longer support a trailing semicolon. I'm not a huge fan of how this looks, but it's a super minor thing and can technically be forced with some dummy struct in each macro if others share the same view. I'm going to mark this as closed - if people run into issues compiling with shadow, extra, or pedantic, they can open up individual issues to get things fixed. |
I'm putting this up for discussion first before trying to make a patch. Currently cereal fails quite horribly when adding -Wshadow -Wextra -pedantic. Is compatibility with those flags something you guys care about? If so, I would likely fix a few of those errors.
The text was updated successfully, but these errors were encountered: