[gnu.utils.bug] problem with cexp.c in GCC 1.30 kit

brant@manta.pha.pa.us (Brant Cheikes) (10/21/88)

There is a discrepancy between the cexp.c supplied in gcc.tar-1.30
(FTP'd from prep.ai.mit.edu) and the one produced by applying the
latest bison to cexp.y.  On both a Vax under Ultrix 2.2 and a UNIXpc
(3b1) under UNIX SYSV, the latest bison produces identical output in
cexp.tab.c, but that output differs from the cexp.c in the gcc-1.30
distribution.  So either the latest bison has a bug or the supplied
cexp.c was produced by a different bison.  The diffs between the two
files follow:

*** /tmp/gcc-1.30/cexp.c	Mon Jun 13 00:17:25 1988
--- cexp.tab.c	Thu Oct 20 19:13:11 1988
***************
*** 56,62
  
  #define	YYACCEPT	return(0)
  #define	YYABORT	return(1)
! #define	YYERROR	return(1)
  #include <stdio.h>
  
  #ifndef __STDC__

--- 56,62 -----
  
  #define	YYACCEPT	return(0)
  #define	YYABORT	return(1)
! #define	YYERROR	goto yyerrlab
  #include <stdio.h>
  
  #ifndef __STDC__
***************
*** 366,372
  #endif
  
  
! #line 165 "bison.simple"
  int
  yyparse()
  {

--- 366,372 -----
  #endif
  
  
! #line 167 "bison.simple"
  int
  yyparse()
  {
***************
*** 480,486
  #endif
  
        if (yyssp >= yyss + yymaxdepth - 1)
! 	YYERROR;
      }
  
  #ifdef YYDEBUG

--- 480,486 -----
  #endif
  
        if (yyssp >= yyss + yymaxdepth - 1)
! 	YYABORT;
      }
  
  #ifdef YYDEBUG
***************
*** 723,729
      break;}
  }
     /* the action file gets copied in in place of this dollarsign */
! #line 303 "bison.simple"
  
    yyvsp -= yylen;
    yyssp -= yylen;

--- 723,729 -----
      break;}
  }
     /* the action file gets copied in in place of this dollarsign */
! #line 408 "bison.simple"
  
    yyvsp -= yylen;
    yyssp -= yylen;
***************
*** 735,741
    if (yydebug)
      {
        short *ssp1 = yyss - 1;
!       fprintf (stderr, "state stack now", yyssp-yyss);
        while (ssp1 != yyssp)
  	fprintf (stderr, " %d", *++ssp1);
        fprintf (stderr, "\n");

--- 735,741 -----
    if (yydebug)
      {
        short *ssp1 = yyss - 1;
!       fprintf (stderr, "state stack now");
        while (ssp1 != yyssp)
  	fprintf (stderr, " %d", *++ssp1);
        fprintf (stderr, "\n");
***************
*** 791,797
  
        /* return failure if at end of input */
        if (yychar == YYEOF)
! 	YYERROR;
  
  #ifdef YYDEBUG
        if (yydebug)

--- 791,797 -----
  
        /* return failure if at end of input */
        if (yychar == YYEOF)
! 	YYABORT;
  
  #ifdef YYDEBUG
        if (yydebug)
***************
*** 819,825
  
  yyerrpop:   /* pop the current state because it cannot handle the error token */
  
!   if (yyssp == yyss) YYERROR;
    yyvsp--;
    yystate = *--yyssp;
  #ifdef YYLSP_NEEDED

--- 819,825 -----
  
  yyerrpop:   /* pop the current state because it cannot handle the error token */
  
!   if (yyssp == yyss) YYABORT;
    yyvsp--;
    yystate = *--yyssp;
  #ifdef YYLSP_NEEDED
***************
*** 830,836
    if (yydebug)
      {
        short *ssp1 = yyss - 1;
!       fprintf (stderr, "Error: state stack now", yyssp-yyss);
        while (ssp1 != yyssp)
  	fprintf (stderr, " %d", *++ssp1);
        fprintf (stderr, "\n");

--- 830,836 -----
    if (yydebug)
      {
        short *ssp1 = yyss - 1;
!       fprintf (stderr, "Error: state stack now");
        while (ssp1 != yyssp)
  	fprintf (stderr, " %d", *++ssp1);
        fprintf (stderr, "\n");
-- 
Brant Cheikes
University of Pennsylvania
Department of Computer and Information Science
Internet: brant@manta.pha.pa.us, UUCP: bpa!manta!brant