Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK

2024-08-01 Thread Kim Barrett
On Sat, 13 Jul 2024 05:34:00 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v5]

2024-08-25 Thread Kim Barrett
On Sat, 24 Aug 2024 05:12:42 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v2]

2022-11-14 Thread Kim Barrett
On Mon, 14 Nov 2022 04:14:24 GMT, Julian Waters wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features t

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v2]

2022-11-14 Thread Kim Barrett
On Mon, 14 Nov 2022 01:42:40 GMT, Julian Waters wrote: >> make/autoconf/flags-cflags.m4 line 632: >> >>> 630: if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = >>> xclang; then >>> 631: STATIC_LIBS_CFLAGS="$STATIC_LIBS_CFLAGS -ffunction-sections >>> -fdata-sections \ >>> 632

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-14 Thread Kim Barrett
On Mon, 14 Nov 2022 16:12:48 GMT, Julian Waters wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features t

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-14 Thread Kim Barrett
On Tue, 15 Nov 2022 00:49:59 GMT, Julian Waters wrote: >> make/hotspot/lib/CompileJvm.gmk line 67: >> >>> 65: # Hotspot cannot handle an empty build number >>> 66: VERSION_BUILD := 0 >>> 67: endif >> >> I think the proposed "solution" is *much* worse than this. > > Reverted to use the origi

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-14 Thread Kim Barrett
On Mon, 14 Nov 2022 08:02:49 GMT, David Holmes wrote: >> Yep, it was renamed since the file is also named VISCPP, and I felt that >> matching the names was a good style change > > I think it is the file that has the "bad" name in this case. :( But okay. I also think the macro name should be lef

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-22 Thread Kim Barrett
On Mon, 21 Nov 2022 02:43:12 GMT, Julian Waters wrote: > Out of curiosity, is there a way to get the discussion on approving the use > of alignas back up? [...] A PR to address JDK-8252584 would be welcomed by me. Just do the process for Style Guide changes (see the Style Guide or previous PRs

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-22 Thread Kim Barrett
On Mon, 14 Nov 2022 12:20:54 GMT, Julian Waters wrote: >> Sorry my eyes must be playing tricks on me. ?? >> >> Why did you need to add this here? > > It's to avoid redefining the linkage as static in os_windows.cpp (where it's > implemented) after an extern declaration (inside the class), which

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-23 Thread Kim Barrett
On Wed, 23 Nov 2022 05:22:10 GMT, Kim Barrett wrote: >> It's to avoid redefining the linkage as static in os_windows.cpp (where it's >> implemented) after an extern declaration (inside the class), which is >> forbidden by C++11: >> >>> The linkag

Re: RFR: 8308286 Fix clang warnings in linux code

2023-05-27 Thread Kim Barrett
On Fri, 26 May 2023 07:48:06 GMT, Daniel JeliƄski wrote: > According to our docs, [clang is a supported compiler for > Linux](https://github.com/openjdk/jdk/blob/master/doc/building.md#native-compiler-toolchain-requirements). I think that's aspirational rather than actual. Clang has been inclu

Re: RFR: 8308286 Fix clang warnings in linux code

2023-05-27 Thread Kim Barrett
On Wed, 17 May 2023 12:28:47 GMT, Artem Semenov wrote: > When using the clang compiler to build OpenJDk on Linux, we encounter various > "warnings as errors". > They can be fixed with small changes. All of the -Wformat-nonliteral changes make me wonder why we're seeing these with clang but not

Re: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v2]

2023-08-07 Thread Kim Barrett
On Mon, 7 Aug 2023 08:00:12 GMT, David Holmes wrote: >> Hi David, this throw was removed for this method's declaration in the >> corresponding hpp file in an earlier commit [8305590: Remove nothrow >> exception specifications from operator >> new](https://github.com/openjdk/jdk/commit/0f51e632

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK

2024-07-12 Thread Kim Barrett
On Fri, 12 Jul 2024 06:29:34 GMT, Julian Waters wrote: > snprintf has been available for all officially and unofficially supported > compilers for Windows, Visual Studio since version 2015 and gcc since, well, > forever. snprintf is conforming to C99 since the start when compiling using > gcc,

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v2]

2024-07-15 Thread Kim Barrett
On Sat, 13 Jul 2024 05:34:24 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v3]

2024-07-16 Thread Kim Barrett
On Tue, 16 Jul 2024 08:59:20 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v2]

2024-07-16 Thread Kim Barrett
On Tue, 16 Jul 2024 08:52:01 GMT, Julian Waters wrote: >> src/jdk.jdwp.agent/windows/native/libjdwp/util_md.h line 32: >> >>> 30: #include /* for _MAx_PATH */ >>> 31: >>> 32: typedef unsigned long long UNSIGNED_JLONG; >> >> This change has nothing to do with _sprintf. Not sure why it's

Re: RFR: 8345757: [ASAN] clang17 report 'dprintf' macro redefined [v3]

2024-12-22 Thread Kim Barrett
On Sat, 21 Dec 2024 03:34:34 GMT, SendaoYan wrote: >> Hi all, >> File src/java.smartcardio/share/native/libj2pcsc/pcsc.c and >> src/jdk.crypto.cryptoki/share/native/libj2pkcs11/j2secmod.h generate compile >> warning `'dprintf' macro redefined` by clang17/llvm17 with fastdebug >> configure. Thi

Re: RFR: 8345757: [ASAN] clang17 report 'dprintf' macro redefined [v3]

2024-12-22 Thread Kim Barrett
On Sat, 21 Dec 2024 16:02:46 GMT, Kim Barrett wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add comments // GNU, POSIX.1-2008 > > src/java.smartcardio/share/native/libj2pcsc/pcs

Re: RFR: 8345757: [ASAN] clang17 report 'dprintf' macro redefined [v4]

2024-12-23 Thread Kim Barrett
On Sun, 22 Dec 2024 02:38:31 GMT, SendaoYan wrote: >> Hi all, >> File src/java.smartcardio/share/native/libj2pcsc/pcsc.c and >> src/jdk.crypto.cryptoki/share/native/libj2pkcs11/j2secmod.h generate compile >> warning `'dprintf' macro redefined` by clang17/llvm17 with fastdebug >> configure. Thi