public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: GCC-3.2.2 bootstrap FAILURE: 1 reduce/reduce conflict in objc-parse.y
@ 2003-01-28 14:04 Paolo Bonzini
  0 siblings, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2003-01-28 14:04 UTC (permalink / raw)
  To: gcc

> I'm not the maintainer, but the patch is wrong.  One cannot replace
> 'protocolrefs' with 'non_empty_protocolrefs', as they are optional.

Right. Then the solution is to add a special non-terminal to identify an
identifier_list of at least two identifiers.

!       /* The @protocol forward-declaration production introduces a
!          reduce/reduce conflict on ';', which should be resolved in
!          favor of the production 'identifier_list -> identifier'.  */
!       | PROTOCOL identifier_list ';'
!               {
!                 objc_declare_protocols ($2);
!               }

This is never reduced if identifier_list is a single identifier.

The 3.2 and 3.3 branch solution might be simply to remove %expect, but 
something else should be done on mainline (possibly 3.3 too).

While I agree in principle that reduce/reduce conflicts are bugs,
they are often (like in this case) problems in the language spec
which is not really LR(1).  Bison should have an option for
"%expect" to specify the count of RR conflicts in the grammar;
new Bisons use a Bison grammar and the change should be
quite simple.

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread
* Re: GCC-3.2.2 bootstrap FAILURE: 1 reduce/reduce conflict in objc-parse.y
@ 2003-01-30 23:38 Paolo Bonzini
  0 siblings, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2003-01-30 23:38 UTC (permalink / raw)
  To: gcc

> Unfortunately, bison/yacc does not have a notation which says,
> "I want you to resolve this reduce/reduce conflict as follows, and I know
> what I'm doing; trust me." However, the 1 reduce/reduce conflict we
> currently have occurs in the state with the following kernel:

It is easy to fix this particular RR conflict, see

http://gcc.gnu.org/ml/gcc/2003-01/msg01443.html

Paolo


^ permalink raw reply	[flat|nested] 33+ messages in thread
* GCC-3.2.2 bootstrap FAILURE: 1 reduce/reduce conflict in objc-parse.y
@ 2003-01-27 22:18 Gabriel Dos_Reis
  2003-01-27 22:32 ` Gabriel Dos Reis
  2003-01-27 22:56 ` Joseph S. Myers
  0 siblings, 2 replies; 33+ messages in thread
From: Gabriel Dos_Reis @ 2003-01-27 22:18 UTC (permalink / raw)
  To: gcc-bugs; +Cc: gcc


A fresh checkout of 3.2.2 branch fails to bootstrap on an i686-pc-linux.  
The failure happens for Objective-C as a reduce/reduce conflict in
objc-parse.y.  I can't locate a recent change to  that file.  So I
guess it must be something having to do my settings.  I'm using Bison
1.875.  Is anyone seeing this failure?

(I'm running another bootstrap on a different machine)

-- Gaby
[...]

stage1/xgcc -Bstage1/ -B/u/molotova/0/galaad/gdosreis/.target/i686-pc-linux-gnu/i686-pc-linux-gnu/bin/ -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I/u/molotova/0/galaad/gdosreis/src/redhat/gcc-3.2/gcc -I/u/molotova/0/galaad/gdosreis/src/redhat/gcc-3.2/gcc/. -I/u/molotova/0/galaad/gdosreis/src/redhat/gcc-3.2/gcc/config -I/u/molotova/0/galaad/gdosreis/src/redhat/gcc-3.2/gcc/../include -I/u/molotova/0/galaad/gdosreis/src/redhat/gcc-3.2/gcc/objc \
-c /u/molotova/0/galaad/gdosreis/src/redhat/gcc-3.2/gcc/objc/objc-lang.c -o objc-lang.o
cd /u/molotova/0/galaad/gdosreis/src/redhat/gcc-3.2/gcc/objc; \
if bison  -o op$$.c objc-parse.y ; then \
  test -f op$$.output && mv -f op$$.output objc-parse.output ; \
  mv -f op$$.c objc-parse.c ; \
else \
  rm -f op$$.* ; \
  false ; \
fi
objc-parse.y: conflicts: 31 shift/reduce, 1 reduce/reduce
objc-parse.y: expected 0 reduce/reduce conflicts
make[2]: *** [/u/molotova/0/galaad/gdosreis/src/redhat/gcc-3.2/gcc/objc/objc-parse.c] Error 1
make[2]: Leaving directory `/0/var/tmp/gdr/gcc/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/0/var/tmp/gdr/gcc/gcc'
make: *** [bootstrap] Error 2

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2003-01-31 20:43 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-28 14:04 GCC-3.2.2 bootstrap FAILURE: 1 reduce/reduce conflict in objc-parse.y Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2003-01-30 23:38 Paolo Bonzini
2003-01-27 22:18 Gabriel Dos_Reis
2003-01-27 22:32 ` Gabriel Dos Reis
2003-01-27 22:52   ` Paolo Carlini
2003-01-27 23:10     ` Gabriel Dos Reis
2003-01-28  0:03       ` Raja R Harinath
2003-01-28  0:23         ` Gabriel Dos Reis
2003-01-27 22:56 ` Joseph S. Myers
2003-01-27 23:20   ` Gabriel Dos Reis
2003-01-28  1:47   ` Ziemowit Laski
2003-01-28  5:19     ` Gabriel Dos_Reis
2003-01-28 11:39     ` Joseph S. Myers
2003-01-28 12:43       ` Gabriel Dos Reis
2003-01-29  0:54       ` Ziemowit Laski
2003-01-29  1:32         ` Joseph S. Myers
2003-01-29  1:49           ` Ziemowit Laski
2003-01-29  2:18             ` Joseph S. Myers
2003-01-29  4:09               ` Stan Shebs
2003-01-30  2:01                 ` Joe Buck
2003-01-29  6:02               ` Ziemowit Laski
2003-01-30  1:43           ` Joe Buck
2003-01-30  2:07             ` Joseph S. Myers
2003-01-30  3:40               ` Joe Buck
2003-01-30  4:20               ` Ziemowit Laski
2003-01-30  4:27                 ` Joseph S. Myers
2003-01-30  6:56                   ` Ziemowit Laski
2003-01-30 11:07                     ` Neil Booth
2003-01-30 14:04                     ` Mark Mitchell
2003-01-30 22:43                       ` Neil Booth
2003-01-30 23:59                       ` Ziemowit Laski
2003-01-31 13:26                         ` Joseph S. Myers
2003-01-31 21:41                           ` Ziemowit Laski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).