This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]