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

Integer constant overflow #2607

Closed
albert-github opened this issue Jan 15, 2023 · 3 comments
Closed

Integer constant overflow #2607

albert-github opened this issue Jan 15, 2023 · 3 comments

Comments

@albert-github
Copy link
Contributor

const uint32_t mod_inv_5 = 0xcccccccd;
const uint32_t mod_inv_25 = mod_inv_5 * mod_inv_5;

Won't this overflow, I got on Windows, 32-bit, some warnings about it:

...\deps\spdlog\include\spdlog\fmt\bundled\format-inl.h(1154): warning C4307: '*': integral constant overflow
...\deps\spdlog\include\spdlog\fmt\bundled\format-inl.h(1186): warning C4307: '*': integral constant overflow
..\deps\spdlog\include\spdlog\fmt\bundled\format-inl.h(1207): warning C4307: '*': integral constant overflow
@gabime
Copy link
Owner

gabime commented Jan 15, 2023

This code is part of fmtlib. Please re open the issue there

@albert-github
Copy link
Contributor Author

Created issue for it:fmtlib/fmt#3274

@albert-github
Copy link
Contributor Author

The issue fmtlib/fmt#3274 has been fixed

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

2 participants