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

Building example_main in VS2015 causes ctti\examples\main.cpp(24): warning C4307: '*': integral constant overflow #24

Open
williamleong opened this issue Mar 26, 2018 · 0 comments

Comments

@williamleong
Copy link

williamleong commented Mar 26, 2018

The warning appears for every line of code in VS2015 (but not clang) that results in a call to fnv1a_hash from hash.hpp.

It appears to be a problem specific to VS2015 with the way the 64 bit fnv1a hash is calculated, but implementing the function mulu64 in the solution by "Cheers and hth. - Alf" in https://stackoverflow.com/questions/37658794/integer-constant-overflow-warning-in-constexpr appears to stop the warning without resorting to setting pragma warnings. Have checked a couple of examples and the hash value generated appears to be the same.

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

No branches or pull requests

1 participant