help-bison
[Top][All Lists]
Advanced

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

Re: member with constructor not allowed in union


From: Hans Aberg
Subject: Re: member with constructor not allowed in union
Date: Wed, 20 Mar 2002 16:50:40 +0100

At 13:55 +0100 2002/03/15, Richard B. Kreckel wrote:
>[X] I would prefer the regular bison.simple to work with C++, so we
>    don't have to change all the packages.

I seems that the stacj is merely using
  /* A type that is properly aligned for any stack member.  */
  union yyalloc
  {
    short yyss;
    YYSTYPE yyvs;
  # if YYLSP_NEEDED
    YYLTYPE yyls;
  # endif
  };
in order to figure out some alginments.

So one should then be able to replace it with MAX(sizeof(yyss),
sizeof(YYSTYPE), ...). (But I have not looked much into this dynamic stack,
and I am not enticed by doing so.)

  Hans Aberg





reply via email to

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