This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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]

[RFC/AIX] xm-aix4.h - Remove alloca #pragma


config/xm-aix4.h contains the following definition:

| /* The IBM compiler requires this in order to properly compile alloca().  */
| #pragma alloca

I just checked with an IBM C compiler, and indeed, we need this pragma
or the link will fail.  Yuck! Can we solve this problem this way?

   . Add a check in configure to link a program using alloca.
   . If pass, we're done.
   . Try again with #pragma alloca
   . If pass, then define #USE_PRAGMA_ALLOCA, or HAVE_PRAGMA_ALLOCA
     or something like this
   . Some other ways to get alloca???
   . If fail, then abort configure, we need alloca.

Then add something like this in defs:

#ifdef USE_PRAGMA_ALLOCA
#pragma alloca
#endif

-- 
Joel


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