RFR: 8214976: Warn about uses of functions replaced for portability [v6]
David Holmes
dholmes at openjdk.java.net
Tue Feb 15 22:12:18 UTC 2022
On Fri, 28 Jan 2022 22:40:45 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Harold Seigel has updated the pull request incrementally with one additional commit since the last revision:
>>
>> change lseek64() calls to os::lseek()
>
> src/hotspot/share/utilities/compilerWarnings_gcc.hpp line 109:
>
>> 107: FORBID_C_FUNCTION(ssize_t write(int, const void*, size_t ), "use os::write");
>> 108:
>> 109: FORBID_C_FUNCTION(char* strtok(char*, const char*), "use strtok_r");
>
> Some of these functions are portable and ought to be forbidden in a platform agnostic location, so the restriction also applies if/when we have real support on other platforms. I think almost none are gcc (or clang) specific, but are instead probably posix and not windows, so maybe should go in a different place as well. Basically I think the structure / placement considerations need some more work.
Can we put the list of forbidden functions in os.hpp?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7248
More information about the hotspot-dev
mailing list