RFR: 8214976: Warn about uses of functions replaced for portability
Thomas Stuefe
stuefe at openjdk.java.net
Sat Jan 29 07:12:19 UTC 2022
On Fri, 28 Jan 2022 22:49:48 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> src/hotspot/share/utilities/compilerWarnings_gcc.hpp line 80:
>>
>>> 78: #define NULL 0
>>> 79: #endif
>>> 80: #endif
>>
>> This is really ugly just because we include dirent.h so we can add the warning for a few functions; and even uglier because it is only needed for AIX, and even uglier still because based on the existing code we only compile AIX with xlc - no? Otherwise we would already need this hack for gcc.
>
> We only compile AIX with xclang these days. I don't know how our "xlc" compiler platform mechanism interacts with our "gcc" (which is really both gcc and clang) compiler platform, or if it interacts, or if it should. But none of that matters for the dirent.h problem. The problem there is that it's a system header, irrespective of what compiler is being used, and it has this problem. So whether we need this NULL cruft here depends on whether AIX with xclang uses this file or not. One option would be to just not deal with the dirent stuff yet, saving that for a followup focused on that problem.
Sorry, I'm confused. We build AIX with xlc. I don't believe we even include this file on AIX. How does this help AIX?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7248
More information about the hotspot-dev
mailing list