gcc 13.2.0 gives warnings like
/home/thomas/repos/sac2c/src/libsacphm/compat/malloc.c: In function ‘memalign’:
/home/thomas/repos/sac2c/build_CFAL/include/runtime/phm_h/phm.h:125:56: warning: array subscript -1 is outside array bounds of ‘void[]’ [-Warray-bounds]
125 | #define SAC_HM_LARGECHUNK_ARENA(header) (((header) + 1)->data1.arena)
This is not an error as there is bookkeeping information in front of the chunks, but gcc does not know that the memory was allocated by the phm version of malloc
instead of the system malloc
.