You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling flex using LLVM 15 or 16 (built from source, although I'm guessing an install from dnf would present the same issue) on the docker image for UBI8, flex fails to compile due to the following error:
misc.c:664:14: warning: call to undeclared function 'reallocarray'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
new_array = reallocarray(array, (size_t) size, element_size);
^
misc.c:664:12: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
new_array = reallocarray(array, (size_t) size, element_size);
The use of reallocarray itself is not the problem, rather it's the fact that the function is undeclared and thus the compiler assumes the return type is int. The problem appears to be here (flexdef.h):
When compiling flex using LLVM 15 or 16 (built from source, although I'm guessing an install from dnf would present the same issue) on the docker image for UBI8, flex fails to compile due to the following error:
The use of
reallocarray
itself is not the problem, rather it's the fact that the function is undeclared and thus the compiler assumes the return type isint
. The problem appears to be here (flexdef.h
):If you look at the other uses of
HAVE_REALLOCARRAY
:this usage is wrong. I believe it should be
In fact making this change allows flex to compile once more.
The text was updated successfully, but these errors were encountered: