GCC-3.2.2 bootstrap FAILURE: 1 reduce/reduce conflict in objc-parse.y

Ziemowit Laski zlaski@apple.com
Tue Jan 28 23:38:00 GMT 2003


On Monday, Jan 27, 2003, at 23:16 US/Pacific, Joseph S. Myers wrote:

> On Mon, 27 Jan 2003, Ziemowit Laski wrote:
>
>>> An objc maintainer needs to review
>>> <http://gcc.gnu.org/ml/gcc-bugs/2003-01/msg00900.html>.
>>
>> I'm not the maintainer, but the patch is wrong.  One cannot replace
>> 'protocolrefs' with 'non_empty_protocolrefs', as they are optional.
>
> A reduce/reduce conflict is still a bug, even if the fix is more
> complicated.  Removing %expect is only a workaround.

A reduce/reduce conflict is certainly an annoyance, but it is not a bug 
-- bison has a deterministic, POSIX-annointed method for dealing with 
it, which the grammar writer knows and expects.

A slightly better way, IMHO, would be to allow %expect to take an 
optional second argument

   %expect sr_conflicts [, rr_conflicts]

so that the grammar writer could state her intent more clearly.  
However, since this mechanism doesn't exist, whacking the %expect 
altogether is a sensible approach.

--Zem
--------------------------------------------------------------
Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477



More information about the Gcc-bugs mailing list