Menu

#198 Provide _alloca

component_package
closed-fixed
2003-01-03
2002-10-05
No

Please also provide _alloca

a simple
#define _alloca alloca

in malloc.h (IIRC) will suffice.

reason: compatibility with MSVC.

Discussion

  • Danny Smith

    Danny Smith - 2002-10-05

    Logged In: YES
    user_id=11494

    Unfortunately, I don't think its that easy. Have a look at
    this thread.
    http://gcc.gnu.org/ml/gcc/1999-01n/msg00198.html

    There was a discussion of this on mingw users list a
    while back, but I can't recall the outcome .

    Danny
    Danny

     
  • Danny Smith

    Danny Smith - 2002-10-05

    Logged In: YES
    user_id=11494

    Here is the thread to which I referred in earlier post:

    http://www.geocrawler.com/mail/thread.php3?
    subject=alloca%28%29+problem+%28Re%3A+%
    5BMingw-users%5D+union+cast+errors%3F%
    29&list=6013

    In your case, using code written for MSVC, the
    #define _alloca alloca
    is correct.

    However, I'm still not sure that code witten for gcc
    might sometimes reference _alloca (the alloca helper
    function that lives in libgcc.a) intentionally. I doubt it
    but ...

    I'll try building gcc and binutils with your define in
    malloc.h and se what happens.

    Danny

    Danny

     
  • Earnie Boyd

    Earnie Boyd - 2003-01-03
    • milestone: 102881 --> component_package
    • status: open --> closed-fixed