This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug: gcc/cp/parse.y & gcc/cp/decl.h: Conflict on TYPENAME


>>>>> "Zack" == Zack Weinberg <zack@codesourcery.com> writes:

Zack> No, this is not a major issue; I just wanted to bring it to your
Zack> attention.  If 1.49final can avoid the warning that'll be great.

Sure.

>> YYSTYPE is available *after* %union.  This is because some people
>> have a %{ %} before %union that define types in %union.  If you
>> find some more elegant scheme, I buy it!

Zack> That'll work - however, it is not documented that %{ %} can come
Zack> after %union, nor that YYSTYPE is then available in that case,
Zack> nor that multiple %{ %} blocks are necessary.  I can provide a
Zack> documentation patch if you would like.

That would be nice.


>> BTW, do you mean pre 1.35 was better in this respect?

Zack> No, as far as I know all released versions would have the same
Zack> problem(s).

Good to know.  I'm curious: I wonder how other Yaccs handle this
problem.  It would be easy to solve if the user were required to use
YYSTYPE* only, but it is not the case :(

I'm working on another new feature, which is best described by an
example:

%print { expr_print ($$); } expr binary_expr foo_expr NUMBER

etc.

It is in competition with YYPRINT, but YYPRINT is far less interesting
because

1. it is not modular
   the day we have something like %include, YYPRINT is broken

2. it addresses only tokens
   since anyway the user can only ``talk´´ about tokens: only them
   are defined in the user space.

Would the GCC team have suggestion wrt this?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]