Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!lnews.iecc.com!nerds-end From: Alessandro Basili Newsgroups: comp.compilers Subject: Re: bison c-parse.y:1115.19-20: $$ for the midrule at $4 of `structsp' has no declared type Date: Wed, 02 Nov 2011 09:45:18 +0100 Organization: Compilers Central Lines: 67 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <11-11-012@comp.compilers> References: <11-10-020@comp.compilers> <11-11-003@comp.compilers> NNTP-Posting-Host: lnews.iecc.com X-Trace: gal.iecc.com 1320288126 6065 64.57.183.34 (3 Nov 2011 02:42:06 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Thu, 3 Nov 2011 02:42:06 +0000 (UTC) Keywords: bison, parse, comment Posted-Date: 02 Nov 2011 22:42:06 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: x330-a1.tempe.blueboxinc.net comp.compilers:314 On 10/31/2011 8:49 PM, Hans Aberg wrote: > On 2011/10/31 14:15, Alessandro Basili wrote: >> ... then I got the following message: >> >>> cd .; bison -v -d c-parse.y -o c-parse.c >>> c-parse.y: conflicts: 10 shift/reduce >>> c-parse.y: expected 8 shift/reduce conflicts >> >> I believe I'm in the dark here. > > Usually, it means that one has to get hold of the authors of the > package, to find out what they had in mind: unfortunately the author does not reply and I believe the current maintainer is also not working on it. > One can deliberately leave shift/reduce conflicts, in which case Bison > will issue a warning, which can be suppressed %expect (see section 3.7.8 > "Suppressing Conflict Warnings" in the Bison manual). thanks for pointing out. > However, there is no way to be sure of that. Especially when it say > expected 8, and you got 10. But the compile and parser will run. > > Hans > [I made the obvious patches and also got 10 rather than 8. I agree, > give this decade-old code a try and see if it works. -John] what do you mean by obvious patches? I managed to compile and still have a bunch of warning that I'm trying to get rid of. Here's what I'm left with so far: > c-common.c: In function decl_attributes': > c-common.c:237: warning: assignment from incompatible pointer type > expr.c: In function emit_block_move': > expr.c:1587: warning: passing argument 1 of emit_library_call' makes pointer from integer without a cast > expr.h:536: note: expected rtx' but argument is of type int' > expr.c: In function clear_storage': > expr.c:1734: warning: passing argument 1 of emit_library_call' makes pointer from integer without a cast > expr.h:536: note: expected rtx' but argument is of type int' > expr.c: In function emit_push_insn': > expr.c:2233: warning: passing argument 1 of emit_library_call' makes pointer from integer without a cast > expr.h:536: note: expected rtx' but argument is of type int' > expr.c: In function expand_assignment': > expr.c:3054: warning: passing argument 1 of emit_library_call' makes pointer from integer without a cast > expr.c:2375: note: expected rtx' but argument is of type int' > expr.c: In function store_expr': > expr.c:3279: warning: passing argument 1 of emit_library_call' makes pointer from integer without a cast > expr.c:2375: note: expected rtx' but argument is of type int' > expr.c: In function expand_expr_1': > expr.c:5013: warning: left shift count >= width of type > expr.c:5017: warning: left shift count >= width of type > cexp.y: In function parse_escape': > cexp.y:797: warning: left shift count >= width of type > cexp.y:799: warning: left shift count >= width of type > cexp.y:827: warning: left shift count >= width of type > cexp.y:829: warning: left shift count >= width of type Giving it a try is a bit difficult, since I'm not sure how to check a compiler! Assuming I manage to compile my application for the ADSP21010, it would also be difficult to check that what I got is what I expect on a systematic basis. Any hint for verifying the compiler (and linker/assembler which I still need to build!) would be of a great help. [See the next message. -John]