bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bision 3.0.2 chokes newline in %union value {}


From: Jochen Sprickerhof
Subject: Bision 3.0.2 chokes newline in %union value {}
Date: Sat, 8 Feb 2014 17:58:34 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

I've found a regression in current bison (3.0.2.11-8044) while trying to
compile [1]. They define %union value {}, which should be possible
according to [2]. Using bison 2.5 this works fine.

Minimal test case:
%{
void yyerror ( const char *msg);
int yylex (void);
%}

%union YYSTYPE {
  int val;
};

%type <val> program

%%

program: { $$ = ""; };

Generated line using bison 3.0.2.11-8044:
typedef union #line 6 "input.y" /* yacc.c:355  */

Using bison 2.5:
typedef union 
/* Line 293 of yacc.c  */
#line 6 "input.y"

Cheers Jochen

[1] https://www.cs.cmu.edu/~ipc/
[2] https://www.gnu.org/software/bison/manual/bison.html#Union-Decl

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]