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
Describe the bug
compile error
zstdlib.src/compress/zstd_compress.c(70) : error C2059: Syntaxfehler: 'Ungültiges Suffix für Zahl'
coming from zstd.h line ~231
#define ZSTD_MAX_INPUT_SIZE ((sizeof(size_t)==8) ? 0xFF00FF00FF00FF00LLU : 0xFF00FF00U)
you may change suffix from LLU to ULL
#define ZSTD_MAX_INPUT_SIZE ((sizeof(size_t)==8) ? 0xFF00FF00FF00FF00ULL : 0xFF00FF00U)
for visual studio 2012, if you like.
test a) in my vs2012 it will work with ULL
test b) in my visual studio 2013+2019 both ULL and LLU is working.
https://stackoverflow.com/questions/14588997/llu-bad-suffix-on-number
"Looking at the standards I have available to me (drafts only, but of reasonably recent versions), both C++ and C define both "ULL" and "LLU" as valid suffixes for an integer literal. This may be a recent change which VS2010 doesn't follow, but I note that VS2012 does the exact same thing (i.e only ULL works)."
"
In short: If you want to write portable C++ code, always use the ULL suffix for unsigned long long literals which will work as expected on Linux and Windows. –
Johannes Overmann
Mar 28, 2013 at 11:30
This has been fixed in VS2013. –
cremno
Apr 7, 2015 at 22:38
"
The text was updated successfully, but these errors were encountered:
We have already received this request, and the main issue was that we could not find a way to write a test on Github Actions to reproduce the issue, to observe that the fix is working, and also ensure the issue remains fixed during future updates.
That's because Github Actions doesn't support VS2012 and lower.
Describe the bug
compile error
zstdlib.src/compress/zstd_compress.c(70) : error C2059: Syntaxfehler: 'Ungültiges Suffix für Zahl'
coming from zstd.h line ~231
#define ZSTD_MAX_INPUT_SIZE ((sizeof(size_t)==8) ? 0xFF00FF00FF00FF00LLU : 0xFF00FF00U)
you may change suffix from LLU to ULL
#define ZSTD_MAX_INPUT_SIZE ((sizeof(size_t)==8) ? 0xFF00FF00FF00FF00ULL : 0xFF00FF00U)
for visual studio 2012, if you like.
test a) in my vs2012 it will work with ULL
test b) in my visual studio 2013+2019 both ULL and LLU is working.
https://stackoverflow.com/questions/14588997/llu-bad-suffix-on-number
"Looking at the standards I have available to me (drafts only, but of reasonably recent versions), both C++ and C define both "ULL" and "LLU" as valid suffixes for an integer literal. This may be a recent change which VS2010 doesn't follow, but I note that VS2012 does the exact same thing (i.e only ULL works)."
"
In short: If you want to write portable C++ code, always use the ULL suffix for unsigned long long literals which will work as expected on Linux and Windows. –
Johannes Overmann
Mar 28, 2013 at 11:30
This has been fixed in VS2013. –
cremno
Apr 7, 2015 at 22:38
"
The text was updated successfully, but these errors were encountered: