Closed kareldonk closed 6 years ago
I'll correct those, thanks. Error C4146 might be a problem, though. First, I am pretty astonished this is an error, and not just a warning. Second, isnt't negation of unsigned integers perfectly defined and portable?
Depending on the MSVC compiler settings (security option turned on) C4146 becomes an error instead of a warning (MSDN doc). It depends on what you're doing and where you're using it. So if you are absolutely sure it's not an issue where you're using it, you can turn the warning/error off in your code. The same goes for the other warnings. To turn off warnings for the whole file or just a line of code, you can use the info on MSDN here.
Well, I do have a cheap workaround that should generate the same code. Instead of writing -x & 63
, I could write (~x + 1) & 63
. Not very readable, though, maybe I should factor it into a function.
I've just pushed an update to deal with those warnings and errors. Does it get rid of everything?
First, I am pretty astonished this is an error, and not just a warning.
MSVC on max warnings is mad, even the standard headers don't build cleanly with it :d
The code compiles cleanly now with no warnings and errors @LoupVaillant. Thanks!
Nice! I'm closing this, thanks for the report.
I get the following warnings and errors when compiling using Microsoft Visual C/C++ 2017.
Due to the errors compilation fails with MSVC. Perhaps you might want to check this for a future release.