On Tue, 25 Mar 2025 12:06:42 GMT, Doug Simon <dnsi...@openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/immediate_aarch64.cpp line 26: >> >>> 24: */ >>> 25: >>> 26: #include <stdlib.h> >> >> Moving these sys includes causes a build failure: >> https://github.com/dougxc/jdk/actions/runs/14054959680/job/39352322113#step:12:537 >> >> In file included from >> /home/runner/work/jdk/jdk/src/hotspot/cpu/aarch64/immediate_aarch64.cpp:26: >> /home/runner/work/jdk/jdk/src/hotspot/cpu/aarch64/immediate_aarch64.hpp:49:1: >> error: ‘uint64_t’ does not name a type; did you mean ‘u_int64_t’? >> 49 | uint64_t logical_immediate_for_encoding(uint32_t encoding); >> | ^~~~~~~~ >> | u_int64_t >> >> The question is whether they should not be re-ordered or whether >> `immediate_aarch64.hpp` should add the sys includes it apparently needs. > > I pushed a commit that prevents the re-ordering: > https://github.com/openjdk/jdk/pull/24180/commits/c0f202d2a7e7b8788719fe8cd2a4c7a095ecd3bb My gut reaction is that header files should be self-sustaining, that is if they need some external header files, these should be included by the header file itself. But that is up to the hotspot folks to decide. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24180#discussion_r2012289902