This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: BUG alloca used as argument to function.
- To: gcc-bugs at gcc dot gnu dot org, grahams at rcp dot co dot uk
- Subject: Re: BUG alloca used as argument to function.
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Sun, 5 Mar 2000 15:52:49 -0500 (EST)
> From: grahams <grahams@rcp.co.uk>
>
> Hi
> ALLOCA_BITMAP() which is used by ALLOCA_REG_SET() is implemented as
> #define ALLOCA_BITMAP () bitmap_initialize ((bitmap)alloca (sizeof(..)))
> alloca () should not be used as an argument to a function.
> Graham
I've seen many people (including myself) make this mistake in
the past. Perhaps we can have gcc warn about this dubious use of
alloca?
But let's not start a flame war about whether its activated by -Wall,
that is a seperate issue. :-) :-)
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions