[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison 1.30h and alloca
From: |
Paul Eggert |
Subject: |
Re: Bison 1.30h and alloca |
Date: |
Sat, 22 Dec 2001 23:32:13 -0800 (PST) |
> From: Akim Demaille <address@hidden>
> Date: 22 Dec 2001 16:27:26 +0100
> > +cc: 1501-218 file input/input.h contains an incorrect file suffix
> Err, I don't understand this one at all, what's wrong with
> `input/input.h' ?
The compiler and won't let you preprocess a file unless its extension
is a known one like ".c". In particular, you can't preprocess ".h"
files with "cc -E". This also explains why it rejected "cc -E 9foo.h".
> Something has changed between now and before, wrt AIX:
Yes, it was a typo in my simplification of the old code. In the
following code:
# if defined (__GNUC__) || defined (_AIX) || defined (__hpux)
# define YYSTACK_ALLOC __builtin_alloca
# endif
the ` || defined (_AIX)' is a typo and should be removed.
Sorry about that. (However, please see below.)
> I am just in favor of removing all the hacks to have alloca used on
> AIX. As a matter of fact, I am in favor of removing _all_ the
> hacks, but the GNU system specific ones.
Upon reflection that sounds wise to me, too. Something like the
following? Sorry, I'm about to leave on vacation for several days,
and I haven't had time to check this out or to install it, so (if
there's a rush in getting the next Bison out) please check and/or
install this for me.
2001-12-22 Paul Eggert <address@hidden>
* src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
Sparc, as they were causing more porting problems than the
(minor) performance improvement was worth.
--- old/src/bison.simple Sat Dec 22 23:12:22 2001
+++ new/src/bison.simple Sat Dec 22 23:20:25 2001
@@ -54,19 +54,9 @@
# define YYSTACK_ALLOC alloca
# define YYSIZE_T YYSTD (size_t)
# else
-# if defined (__GNUC__) || defined (_AIX) || defined (__hpux)
+# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
-# ifndef __GNUC__
-# ifdef _AIX
- # pragma alloca
-# endif
-# if defined (__sgi) || defined (__sparc__) || defined (__sparc) ||
defined (__sun)
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSTACK_ALLOC alloca
-# define YYSIZE_T YYSTD (size_t)
-# endif
-# endif
# endif
# endif
# endif