On Tue, 30 Apr 2024 09:36:52 GMT, Joachim Kern <jk...@openjdk.org> wrote:
>> On AIX `stdlib.h` also would define `alloca`, if `__STRICT_ANSI__` wouldn't >> be set. >> >> >> 780 #if !defined(__xlC__) || defined(__ibmxl__) || defined(__cplusplus) >> 781 #if defined(__IBMCPP__) && !defined(__ibmxl__) >> 782 extern "builtin" char *__alloca (size_t); >> 783 # define alloca __alloca >> 784 #elif defined(__GNUC__) && !defined(__STRICT_ANSI__) >> 785 #undef alloca >> 786 #define alloca(size) __builtin_alloca (size) >> 787 #endif >> >> >> A small plain Testprogramm not using all of the flags we used in jdk build, >> does not set `__STRICT_ANSI__` and then `alloca` is defined correct. > > The compiler flag introducing __STRICT_ANSI__ is -std=c++14. If I omit this > explicit compiler flag the default is used, which is also c++14. But the > default does not set __STRICT_ANSI__ but 2 other defines. I will try a build > without -std=c++14 and if this works, we have a solution. Nevertheless i will > interrogate IBM what the hell this behavior should be. I don't think leaving out `-std=c++14` for AIX is a good solution. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1584529538