alloca and HP

Donn Terry
Sun Jan 31 23:58:00 GMT 1999

Mumit Khan wrote:
> On Fri, 22 Jan 1999, Jerry Quinn wrote:
> > Apparently, alloca IS defined on HP, but you have to #include <alloca.h>
> > and link to -lmalloc.
> >
> If memory serves me correctly, there is no alloca in 9.0.x, but it
> is there in 10.2 hiding in libPW.a, not libmalloc.a. I don't
> have access right to any HP machine at the moment, so take this with
> a grain of salt. Also, I don't believe 9.0.7 has a libmalloc.a, and
> it's deprecated, in fact an empty archive, in 10.2x.

I don't have access either, but if *my* memory serves, it's not
in 9.* at all but in 10.<something> it shows up as a compiler builtin.
(I'm not sure if <something> is >=0 or >1.)  If you have access to
a 10.* HP, try to see if some name like _builtin_alloca works.
(Or see if you can find a manual.)

(The Gwyn malloc-based alloca() works fine (but the performance is
as would be as expected for it) on 9.* and earlier.

Donn Terry

More information about the Gcc mailing list