https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78503
--- Comment #3 from Bernd Edlinger <edlinger at gcc dot gnu.org> --- It is on purpose that the warning gets suppressed when "(N) != 0" or "(N) + 0" is used, so that won't go away. But may I suggest the following for the XALLOCAVEC macro: #define XALLOCAVEC(T, N) ((N) > 0 ? (T *) alloca (sizeof (T) * (N)) : (T *)0) this would also avoid possible warnings about alloca with negative N.