Subject: Re: make build error with Mar 23, 96
To: CHAN Yiu Wah <clarence@cs.cuhk.hk>
From: Tsuyoshi Tada <tsuyo@aqu.bekkoame.or.jp>
List: current-users
Date: 03/26/1996 00:49:52
on Mon, 25 Mar 1996 13:10:20 +0800 (HKT), CHAN wrote:

 > I tried to make build with Mar 23, 96 source, I got the following error
 > 
 > ======= Error =======
 > cc1plus: warnings being treated as errors
 > y.tab.c: In function `int yygrowstack()':
 > y.tab.c:3413: warning: ANSI C++ forbids implicit conversion from `void
 > *' in assignment
 > y.tab.c:3417: warning: ANSI C++ forbids implicit conversion from `void
 > *' in assignment
 > *** Error code 1
 > 
 > Stop.
 > ======= Error =======
 > 
 > Is there anyone has the same problem ?  Please share your expeerience
 > with me. Thank you in advance.

I got exactly same error, so I modified yacc parser generator as follows.


*** usr.bin/yacc/skeleton.c.orig      Fri Mar 22 11:47:18 1996
--- usr.bin/yacc/skeleton.c     Sun Mar 24 11:41:51 1996
***************
*** 145,155 ****
      "    else if ((newsize *= 2) > YYMAXDEPTH)",
      "        newsize = YYMAXDEPTH;",
      "    i = yyssp - yyss;",
!     "    if ((newss = realloc(yyss, newsize * sizeof *newss)) == NULL)",
      "        return -1;",
      "    yyss = newss;",
      "    yyssp = newss + i;",
!     "    if ((newvs = realloc(yyvs, newsize * sizeof *newvs)) == NULL)",
      "        return -1;",
      "    yyvs = newvs;",
      "    yyvsp = newvs + i;",
--- 145,155 ----
      "    else if ((newsize *= 2) > YYMAXDEPTH)",
      "        newsize = YYMAXDEPTH;",
      "    i = yyssp - yyss;",
!     "    if ((newss = (short *)realloc(yyss, newsize * sizeof *newss)) == NULL)",
      "        return -1;",
      "    yyss = newss;",
      "    yyssp = newss + i;",
!     "    if ((newvs = (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs)) == NULL)",
      "        return -1;",
      "    yyvs = newvs;",
      "    yyvsp = newvs + i;",


--
Tsuyoshi Tada (tsuyo@aqu.bekkoame.or.jp)