On Tue, 9 Apr 2024 19:20:22 GMT, Kim Barrett <kbarr...@openjdk.org> wrote:
>> Joachim Kern has updated the pull request incrementally with one additional >> commit since the last revision: >> >> version check not needed anymore > > src/hotspot/share/utilities/globalDefinitions_gcc.hpp line 36: > >> 34: #if defined(_AIX) >> 35: #include <alloca.h> >> 36: #endif > > I would much rather see this include added in the few places it was actually > needed, rather than being > added here. Do we even need to include <alloca.h>? >From the Linux man page for alloca: By necessity, alloca() is a compiler built-in, also known as __builtin_alloca(). By default, modern compilers automatically translate all uses of alloca() into the built-in, but this is forbidden if standards conformance is requested (-ansi, -std=c*), in which case <alloca.h> is required, lest a symbol dependency be emitted. There are uses of it in shared code where there isn't an applicable include, other than from globalDefinitions_xlc.hpp. So it appears all other supported compilers do treat it as a built-in with the options we are providing, and don't need the include. Maybe that's true for the new xlc compiler too? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1558565268