You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> I wasn't able to reproduce this in https://godbolt.org/z/baaGbjebz. Please provide more repro details.
There is indeed this problem, and I have reproduced it on the website you provided, but you need to choose x64msvc19.22 and earlier versions of the compiler.I copied the warning message:
(5): warning C4307: '*': integral constant overflow
Program returned: 0
But using newer versions of the compiler does not have this warning. Why? Did the compiler do the optimization?
I'm doing the math,
const uint32_t mod_inv_5 = 0xcccccccd = 3_435_973_837 (decimal),
the square of it is 11_805_916_208_548_502_569,
It does exceed the maximum range of uint32_t (4_294_967_295) ,
so the warning message seems reasonable, is it a bug?
There is indeed this problem, and I have reproduced it on the website you provided, but you need to choose x64msvc19.22 and earlier versions of the compiler.I copied the warning message:
x64 msvc v19.22 /std:c++latest /W2
Compiler stdout
example.cpp
But using newer versions of the compiler does not have this warning. Why? Did the compiler do the optimization?
I'm doing the math,
const uint32_t mod_inv_5 = 0xcccccccd = 3_435_973_837 (decimal),
the square of it is 11_805_916_208_548_502_569,
It does exceed the maximum range of uint32_t (4_294_967_295) ,
so the warning message seems reasonable, is it a bug?
Originally posted by @Qujamlee in #3163 (comment)
The text was updated successfully, but these errors were encountered: