[crac] RFR: Compile all the INCLUDE_LD_SO_LIST_DIAGNOSTICS code unconditionally [v2]
Jan Kratochvil
jkratochvil at openjdk.org
Tue Oct 31 07:40:25 UTC 2023
On Tue, 31 Oct 2023 06:56:41 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
>> Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix compilation errors during all the 3 configurations:
>> #undef INCLUDE_CPU_FEATURE_ACTIVE
>> #undef INCLUDE_LD_SO_LIST_DIAGNOSTICS
>> #define INCLUDE_CPU_FEATURE_ACTIVE 0/1
>> #define INCLUDE_LD_SO_LIST_DIAGNOSTICS 0/1
>> - but never 1 for both
>
> src/hotspot/cpu/x86/vm_version_x86.cpp line 944:
>
>> 942: const char *env = getenv(TUNABLES_NAME);
>> 943: if (env && strcmp(env, env_val) == 0) {
>> 944: if (!INCLUDE_CPU_FEATURE_ACTIVE && !INCLUDE_LD_SO_LIST_DIAGNOSTICS) {
>
> Have you tested compilation with these disabled? Looks to me like the compiler could complain about unreachable code when the condition is always false...
I have tried all the 3 compilation cases only now. I do not see such compiler warnings (although different compilations and compilers produce different warnings) but I could fix some other problems. Which will make me update #112.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/136#discussion_r1377162882
More information about the crac-dev
mailing list