mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
* 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. Also, catch up with 1.31's YYSTD.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2001-12-27 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* 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.
|
||||
|
||||
Also, catch up with 1.31's YYSTD.
|
||||
|
||||
2001-12-27 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* src/output.c (output_gram): Rely on nritems, not the
|
||||
|
||||
@@ -85,8 +85,6 @@ typedef struct yyltype
|
||||
/* Line %%skeleton-line of %%skeleton. */
|
||||
#line %%line "%%parser-file-name"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* All symbols defined below should begin with yy or YY, to avoid
|
||||
infringing on user name space. This should be done even for local
|
||||
variables, as they might otherwise be expanded by user macros.
|
||||
@@ -94,32 +92,28 @@ typedef struct yyltype
|
||||
define necessary library symbols; they are noted "INFRINGES ON
|
||||
USER NAME SPACE" below. */
|
||||
|
||||
#if ! defined (yyoverflow) || YYERROR_VERBOSE
|
||||
#ifdef __cplusplus
|
||||
# define YYSTD(x) std::x
|
||||
#else
|
||||
# define YYSTD(x) x
|
||||
#endif
|
||||
|
||||
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
|
||||
|
||||
/* The parser invokes alloca or malloc; define the necessary symbols. */
|
||||
|
||||
# if YYSTACK_USE_ALLOCA
|
||||
# define YYSTACK_ALLOC alloca
|
||||
# define YYSIZE_T size_t
|
||||
# define YYSIZE_T YYSTD (size_t)
|
||||
# else
|
||||
# ifndef YYSTACK_USE_ALLOCA
|
||||
# if defined (alloca) || defined (_ALLOCA_H)
|
||||
# define YYSTACK_ALLOC alloca
|
||||
# define YYSIZE_T size_t
|
||||
# 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 size_t
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
@@ -131,16 +125,14 @@ typedef struct yyltype
|
||||
# ifdef __cplusplus
|
||||
# include <cstdlib> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YYSIZE_T std::size_t
|
||||
# define YYSTACK_ALLOC std::malloc
|
||||
# define YYSTACK_FREE std::free
|
||||
# else
|
||||
# ifdef __STDC__
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YYSIZE_T size_t
|
||||
# endif
|
||||
# define YYSTACK_ALLOC malloc
|
||||
# define YYSTACK_FREE free
|
||||
# endif
|
||||
# define YYSTACK_ALLOC YYSTD (malloc)
|
||||
# define YYSTACK_FREE YYSTD (free)
|
||||
# endif
|
||||
|
||||
/* A type that is properly aligned for any stack member. */
|
||||
@@ -400,13 +392,11 @@ while (0)
|
||||
# ifndef YYFPRINTF
|
||||
# ifdef __cplusplus
|
||||
# include <cstdio.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YYFPRINTF std::fprintf
|
||||
# define YYSTDERR std::stderr
|
||||
# else
|
||||
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YYFPRINTF fprintf
|
||||
# define YYSTDERR stderr
|
||||
# endif
|
||||
# define YYFPRINTF YYSTD (fprintf)
|
||||
# define YYSTDERR YYSTD (stderr)
|
||||
# endif
|
||||
|
||||
# define YYDPRINTF(Args) \
|
||||
|
||||
Reference in New Issue
Block a user