/* Find and resolve or report look-ahead conflicts for bison,
- Copyright (C) 1984, 1989 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1992 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-#ifdef _AIX
- #pragma alloca
-#endif
#include <stdio.h>
#include "system.h"
#include "machine.h"
#include "state.h"
-#ifndef __GNUC__
-#undef alloca
-#define alloca __builtin_alloca
-#else
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#else
-#ifndef _AIX
-extern char *alloca ();
-#endif
-#endif
-#endif
-
extern char **tags;
extern int tokensetsize;
extern char *consistent;
register unsigned *fp1;
register unsigned *fp2;
register int redprec;
- /* Extra parens avoid errors on Ultrix 4.3. */
- errs *errp = (errs *) alloca ((sizeof(errs) + ntokens * sizeof(short)));
+ errs *errp = (errs *) xmalloc (sizeof(errs) + ntokens * sizeof(short));
short *errtokens = errp->errs;
/* find the rule to reduce by to get precedence of reduction */
}
else
err_table[state] = 0;
+ free(errp);
}
fp3 = lookaheadset;
while (fp3 < fp4)
- *fp3++ = *fp1++ & ( ~ (*fp2++));
+ *fp3++ = *fp1++ & (~(*fp2++));
count = 0;
mask = 1;