RFR: 8305955: Remove Visual C++ specific workaround in javac
Julian Waters
jwaters at openjdk.org
Thu Apr 13 12:58:33 UTC 2023
On Thu, 13 Apr 2023 11:36:15 GMT, Julian Waters <jwaters at openjdk.org> wrote:
> Visual C++ no longer requires the use of the i64 literal syntax and instead recommends the use of LL instead, so we should remove this workaround in the JNIWriter (this also helps when users write Windows JNI code meant to be compiled with alternate compilers other than Visual C++)
While concrete documentation guarantees a minimum version of at least Visual C++ 2015 which supports the LL suffix, searches from earlier suggest that it supported this literal specifier as early as versions 2008 - 2010, with one source dating back all the way to Visual C++ 2005! Currently though, users will always have to use MSVC with the current JNIWriter when on Windows, since it is the only supported compiler that supports i64 as a literal suffix
https://learn.microsoft.com/en-us/cpp/cpp/numeric-boolean-and-pointer-literals-cpp?view=msvc-140#integer-literals
https://learn.microsoft.com/en-us/cpp/c-language/c-integer-constants?view=msvc-140
https://cboard.cprogramming.com/c-programming/98707-formatting-16-bytes-hex-2.html
https://stackoverflow.com/questions/14588997/llu-bad-suffix-on-number
https://stackoverflow.com/questions/2835746/how-do-you-specify-a-64-bit-unsigned-int-const-0x8000000000000000-in-vs2008
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13457#issuecomment-1506918224
More information about the compiler-dev
mailing list