|
From: | Yair Lenga |
Subject: | Compiler Problems w/Bison 1.28 on SGI/IRIX65 |
Date: | Tue, 02 Jan 2001 11:41:31 -0500 |
I was trying to upgrade my bison (from 1.25 to 1.28). I found the following two compilation problem - fixed them on my SGI. I will appreciate if you can incorporate those changes into future releases of Bison:
My workaround/solution was to change the top of the file where YYSTACK_ALLOC
is defined:
#ifdef YYSTACK_USE_ALLOCA
#define YYSTACK_ALLOC alloca
#define YYSTACK_FREE(x)
/* YL, 1/2/01 */
#define free(x)
#else
#define YYSTACK_ALLOC malloc
#define YYSTACK_FREE(x) free(x)
#endif
And to replace calls to 'free' with calls to YYSTACK_FREE.
Compiler Error:
bison -d -phyy expr.y
cc -signed -xansi -fullwarn -g -w2 -woff 1174,1233,1552,3201
-diag_error 1164,1196 expr.tab.c
The indicated function is declared implicitly.
free (yyss);
^
cc-1498 cc: REMARK File = /usr/freeware/share/bison.simple, Line = 362
There is no prototype for the call to free.
free (yyvs);
^
cc-1196 cc: ERROR File = /usr/freeware/share/bison.simple, Line = 742
The indicated function is declared implicitly.
free (yyss);
^
#else
#ifdef __STDC__
static void __yy_memcpy (char *to, char *from, unsigned int count)
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#endif
#else
#ifndef __cplusplus__
...
[Prev in Thread] | Current Thread | [Next in Thread] |