Bug in cp/parse.y in 3.1 branch

David O'Brien obrien@FreeBSD.org
Wed Apr 24 00:37:00 GMT 2002


On Tue, Apr 23, 2002 at 09:43:48PM -0700, David S. Miller wrote:
>    From: "David O'Brien" <obrien@FreeBSD.org>
>    Date: Tue, 23 Apr 2002 12:10:17 -0700
>    
>    So?  What is it being assigned into then?  There is no 3rd RHS rule in
>             nomods_initdcl0: notype_declarator maybeasm
>    
>    Is this working around a bug in Bison, or utilizing a Bison extension?
>    cc1plus built with a Byacc produced parse.c will not accept all valid C++
>    code.
> 
> David, one point to be made is that we have very strict rules about
> which tools can be used to build the generated files.

Yes I know the expectations.  
But I still want to understand why the code is as it is. :-) I have never
seen any YACC documentation explicitly say you can refer to a RHS rule
that isn't present in the grammar rule.  Admittedly like most, I have
only written simple grammars in the past.  So a comment in the code would
be helpful that it is intentional, why, and how.



More information about the Gcc-bugs mailing list