This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
alloca (0) in include/libiberty.h
- From: Martin Liška <mliska at suse dot cz>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 10 Jun 2019 09:24:48 +0200
- Subject: alloca (0) in include/libiberty.h
Hi.
I've just noticed that we have couple of alloca (0) in libiberty:
#ifndef REGEX_MALLOC
# ifdef C_ALLOCA
alloca (0);
# endif
#endif
If I'm correct the value 0 has a special meaning that tells a C library
to clean up all previous alloca allocations.
man alloca does not document the behavior
Question is how legacy is alloca call from a standard library?
Thanks,
Martin