alloca() portability

Doug Gwyn gwyn at smoke.brl.mil
Fri Nov 9 18:42:15 AEST 1990


In article <9122 at ncar.ucar.edu> steve at groucho.ucar.edu (Steve Emmerson) writes:
>In <14377 at smoke.brl.mil> gwyn at smoke.brl.mil (Doug Gwyn) writes:
>>It is worth repeating over and over:  DON'T WRITE CODE THAT USES alloca()!
>But why?  You yourself admitted that systems on which your alloca()
>couldn't work are few and far between.

Because it's not needed, so why ask for problems?
When there are strictly conforming methods to achieve your ends, you
should use them, because probably some day some poor slob is going to
have to port your code to a radically different architecture, and the
Golden Rule says you shouldn't make his life miserable.



More information about the Comp.lang.c mailing list