This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[PATCH] Fix minor AIX compilation warning in libiberty.


This trivial patch fixes a compilation warning when compiling libiberty
on AIX using GCC.  The "#pragma alloca" is only required on AIX when
using IBM's compilers.  The patch below changes the "#if" around the
#pragma in regex.c to match the one in putenv.c.  These are the only
two uses of "#pragma alloca" in libiberty.

Tested by bootstrapping GCC on i686-pc-linux-gnu and both with and
without xlC on powerpc-ibm-aix5.1.0.0.


Ok for mainline (or somewhere else)?



2002-09-03  Roger Sayle  <roger@eyesopen.com>

	* regex.c: Only use "#pragma alloca" on AIX when not using gcc.


Index: libiberty/regex.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/regex.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 regex.c
*** libiberty/regex.c	7 Aug 2002 20:57:22 -0000	1.11
--- libiberty/regex.c	3 Sep 2002 23:51:11 -0000
***************
*** 25,31 ****
     routines with an "x" prefix so they do not collide with the native regex
     routines or with other components regex routines. */
  /* AIX requires this to be the first thing in the file. */
! #if defined _AIX && !defined REGEX_MALLOC
    #pragma alloca
  #endif

--- 25,31 ----
     routines with an "x" prefix so they do not collide with the native regex
     routines or with other components regex routines. */
  /* AIX requires this to be the first thing in the file. */
! #if defined _AIX && !defined __GNUC__ && !defined REGEX_MALLOC
    #pragma alloca
  #endif


Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833


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