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 [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 Julian Waters
On Mon, 14 Nov 2022 08:01:27 GMT, David Holmes wrote: >> I'm not sure I follow, I didn't remove anything here? > > 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) aft

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

2022-11-14 Thread Julian Waters
On Mon, 14 Nov 2022 08:08:40 GMT, David Holmes wrote: >> The ATTRIBUTE_PRINTF macros are still there, just moved in front of the >> methods > > Wow I'm really having eyesight problems today! Sorry about that. Haha, no worries - PR: https://git.openjdk.org/jdk/pull/11081

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

2022-11-14 Thread Andrew Haley
On Mon, 14 Nov 2022 08:28:04 GMT, Thomas Stuefe wrote: > unfortunately, your patch will make backporting more difficult. We cannot > downport it to older releases compiled with older compilers. But since it > touches a lot of files it will sit smack in the middle of patch sequences, > requirin

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

2022-11-14 Thread Thomas Stuefe
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 David Holmes
On Mon, 14 Nov 2022 01:39:17 GMT, Julian Waters wrote: >> src/hotspot/share/utilities/debug.hpp line 172: >> >>> 170: int status, const char* detail); >>> 171: ATTRIBUTE_PRINTF(4, 5) >>> 172: void report_fatal(VMErrorType error_type, const char* file, int line, >>> c

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

2022-11-14 Thread David Holmes
On Mon, 14 Nov 2022 01:17:38 GMT, Julian Waters wrote: >> src/hotspot/os/windows/os_windows.hpp line 35: >> >>> 33: class Thread; >>> 34: >>> 35: static unsigned __stdcall thread_native_entry(Thread*); >> >> Why was this removed? This is needed to correctly specify the call sequence >> for th

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

2022-11-13 Thread Julian Waters
On Sun, 13 Nov 2022 22:58:11 GMT, David Holmes wrote: >> Julian Waters has updated the pull request incrementally with one additional >> commit since the last revision: >> >> ATTRIBUTE_SCANF > > src/hotspot/os/linux/os_perf_linux.cpp line 233: > >> 231: * Ensure that 'fmt' does _NOT_ conta

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

2022-11-13 Thread Julian Waters
> 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 that were previously not available due to required compatibili