Re: warning: unused value: $3

2006-11-01 Thread henrik . sorensen
On Wednesday 01 November 2006 00:44, Joel E. Denny wrote: > On Fri, 27 Oct 2006, Joel E. Denny wrote: > > I think I'm seeing it your way at least as far as these mid-rule warnings > > are concerned. Looking at it from another angle, while it's probably ok > > to warn about potentially dangerous us

Re: warning: unused value: $3

2006-10-31 Thread Joel E. Denny
en --warnings=midrule-values is +# set. m4_define([AT_CHECK_UNUSED_VALUES], [AT_DATA([input.y], @@ -116,19 +118,19 @@ l: INT | INT { $$ = $1 _AT_UNUSED_VALUES_DECLARATIONS]) ) -AT_CHECK([bison input.y], [0], [], +AT_CHECK([bison]m4_ifval($2, [ --warnings=midrule-values ])[ input.y], [0], [],

Re: warning: unused value: $3

2006-10-27 Thread Joel E. Denny
On Fri, 27 Oct 2006, Hans Aberg wrote: > On 27 Oct 2006, at 07:59, Joel E. Denny wrote: > > > I'd rather choose a global default (mid-rule warnings on or off) and then > > let the user specify otherwise either globally (-W) or case-by-case (USE). > > The way I reason is that a package distributi

Re: warning: unused value: $3

2006-10-27 Thread Hans Aberg
On 27 Oct 2006, at 07:59, Joel E. Denny wrote: I'd rather choose a global default (mid-rule warnings on or off) and then let the user specify otherwise either globally (-W) or case-by-case (USE). The way I reason is that a package distribution should normally not issue any warnings - just

Re: warning: unused value: $3

2006-10-26 Thread Joel E. Denny
On Fri, 27 Oct 2006 [EMAIL PROTECTED] wrote: > > Then again, I try to > > avoid mid-rules, $0, and $-n, so maybe I don't have the right feel for > > this. > maybe disable the check completely if $0 or $-n is used. That's an interesting possibility. However, I worry that there are cases where

Re: warning: unused value: $3

2006-10-26 Thread henrik . sorensen
On Friday 27 October 2006 00:12, you wrote: > On Thu, 26 Oct 2006 [EMAIL PROTECTED] wrote: > > > in semantic actions at any level in the parse tree. Bison would have > > > to check every possible expansion of every possible RHS symbol. That > > > implementation seems like more work than I want to

Re: warning: unused value: $3

2006-10-26 Thread Joel E. Denny
On Thu, 26 Oct 2006, Hans Aberg wrote: > On 26 Oct 2006, at 22:55, Joel E. Denny wrote: > > > What if we simply add an option to turn this warning off globally? > > It was this warning tricking me into believe there was something funny about > $0. So I think it should by default be off, unless o

Re: warning: unused value: $3

2006-10-26 Thread Joel E. Denny
On Thu, 26 Oct 2006 [EMAIL PROTECTED] wrote: > > in semantic actions at any level in the parse tree. Bison would have to > > check every possible expansion of every possible RHS symbol. That > > implementation seems like more work than I want to do. > ... but how hard would it be to check just o

Re: usage $0 (was warning: unused value: $3)

2006-10-26 Thread Hans Aberg
On 26 Oct 2006, at 16:49, [EMAIL PROTECTED] wrote: be guaranteed, in view of that Bison is switching to other types of containers than an underlying array. but should the container still support the $0 notation ? that did not come out right, should have read ...but surely the new containers wi

Re: warning: unused value: $3

2006-10-26 Thread Hans Aberg
On 26 Oct 2006, at 22:55, Joel E. Denny wrote: What if we simply add an option to turn this warning off globally? It was this warning tricking me into believe there was something funny about $0. So I think it should by default be off, unless one is choosing finicky mode, as on other compil

Re: warning: unused value: $3

2006-10-26 Thread henrik . sorensen
On Thursday 26 October 2006 22:55, Joel E. Denny wrote: > On Thu, 26 Oct 2006 [EMAIL PROTECTED] wrote: > > > That is, do you believe this warning is too much trouble to be > > > worthwhile? > > > > The warning would be ok, if it was only true. > > It's true inasmuch as we specifically intended to w

Re: warning: unused value: $3

2006-10-26 Thread Joel E. Denny
On Thu, 26 Oct 2006 [EMAIL PROTECTED] wrote: > > That is, do you believe this warning is too much trouble to be > > worthwhile? > The warning would be ok, if it was only true. It's true inasmuch as we specifically intended to warn about the current rule's actions without regard to other rules

Re: warning: unused value: $3

2006-10-26 Thread henrik . sorensen
On Thursday 26 October 2006 21:35, Joel E. Denny wrote: > On Thu, 26 Oct 2006 [EMAIL PROTECTED] wrote: > > On Thursday 26 October 2006 20:45, Joel E. Denny wrote: > > > On Thu, 26 Oct 2006 [EMAIL PROTECTED] wrote: > > > > On Thursday 26 October 2006 02:27, Joel E. Denny wrote: > > > > > > That's ni

Re: warning: unused value: $3

2006-10-26 Thread Joel E. Denny
On Thu, 26 Oct 2006 [EMAIL PROTECTED] wrote: > On Thursday 26 October 2006 20:45, Joel E. Denny wrote: > > On Thu, 26 Oct 2006 [EMAIL PROTECTED] wrote: > > > On Thursday 26 October 2006 02:27, Joel E. Denny wrote: > > > That's nice. I'm wondering why the grammar doesn't use $-1 and drop the > >

Re: warning: unused value: $3

2006-10-26 Thread henrik . sorensen
On Thursday 26 October 2006 20:45, Joel E. Denny wrote: > On Thu, 26 Oct 2006 [EMAIL PROTECTED] wrote: > > On Thursday 26 October 2006 02:27, Joel E. Denny wrote: > That's nice. I'm wondering why the grammar doesn't use $-1 and drop the > mid-rule entirely, but I haven't test this. I'm thinking

Re: warning: unused value: $3

2006-10-26 Thread Joel E. Denny
On Thu, 26 Oct 2006 [EMAIL PROTECTED] wrote: > On Thursday 26 October 2006 02:27, Joel E. Denny wrote: > > > Line 873 contains: |??procoptionlist ',' {$$=$1;} procoption {$$=$1;} > > > $3 refers to the embedded action after the comma. > > > > In the last semantic action above, write: > > > > ? USE

Re: warning: unused value: $3

2006-10-26 Thread henrik . sorensen
On Thursday 26 October 2006 10:41, Akim Demaille wrote: > >>> "Hans" == Hans Aberg <[EMAIL PROTECTED]> writes: > > [Just passing by, no time for more :( ] > > > It was before I recalling you showing up on the list. Probably Bug- > > Bison. Perhaps Akim or Paul can inform the truth about $0. > > I

Re: warning: unused value: $3

2006-10-26 Thread henrik . sorensen
On Thursday 26 October 2006 02:27, Joel E. Denny wrote: > > Line 873 contains: |  procoptionlist ',' {$$=$1;} procoption {$$=$1;} > > $3 refers to the embedded action after the comma. > > In the last semantic action above, write: > >   USE($3) > > > My grammar set a number of attributes in an alloc

Re: usage $0 (was warning: unused value: $3)

2006-10-26 Thread henrik . sorensen
On Wednesday 25 October 2006 23:35, Hans Aberg wrote: > >> be guaranteed, in view of that Bison is switching to other types of > >> containers than an underlying array. > > but should the container still support the $0 notation ? that did not come out right, should have read ...but surely the new c

Re: warning: unused value: $3

2006-10-26 Thread Joel E. Denny
On Thu, 26 Oct 2006, Akim Demaille wrote: > >>> "Hans" == Hans Aberg <[EMAIL PROTECTED]> writes: > > [Just passing by, no time for more :( ] > > > It was before I recalling you showing up on the list. Probably Bug- > > Bison. Perhaps Akim or Paul can inform the truth about $0. > > I did sugge

Re: warning: unused value: $3

2006-10-26 Thread Akim Demaille
>>> "Hans" == Hans Aberg <[EMAIL PROTECTED]> writes: [Just passing by, no time for more :( ] > It was before I recalling you showing up on the list. Probably Bug- > Bison. Perhaps Akim or Paul can inform the truth about $0. I did suggest it would be nice to be able to name them, and actually t

Re: warning: unused value: $3

2006-10-26 Thread Joel E. Denny
On Thu, 26 Oct 2006, Hans Aberg wrote: > On 26 Oct 2006, at 02:03, Joel E. Denny wrote: > > > I don't know the plans for the C++ skeletons. However, the Open Group > > specifies that $0 and $-n should be supported by Yacc, so this should not > > go away for the C skeletons at least. > > If says

Re: warning: unused value: $3

2006-10-26 Thread Hans Aberg
On 26 Oct 2006, at 02:03, Joel E. Denny wrote: I don't know the plans for the C++ skeletons. However, the Open Group specifies that $0 and $-n should be supported by Yacc, so this should not go away for the C skeletons at least. If says that $0 should be supported, Bison is likely to suppo

Re: warning: unused value: $3

2006-10-25 Thread Joel E. Denny
On Wed, 25 Oct 2006 [EMAIL PROTECTED] wrote: > using bison version 2.2. > Message from bison: > pl1-parser.y:873.17-63: warning: unused value: $3 > > This warning I find a bit confusing... When we discussed adding this warning, we agreed that it's usually a mistake if th

Re: warning: unused value: $3

2006-10-25 Thread Joel E. Denny
On Wed, 25 Oct 2006, Hans Aberg wrote: > > > be guaranteed, in view of that Bison is switching to other types of > > > containers than an underlying array. > > but should the container still support the $0 notation ? > > My memory is hazy, so you will have to wait for the developers with the full

Re: warning: unused value: $3

2006-10-25 Thread Hans Aberg
On 25 Oct 2006, at 23:26, Joel E. Denny wrote: On Wed, 25 Oct 2006, Hans Aberg wrote: I think you should take away the use of $0, because it may no longer be guaranteed, in view of that Bison is switching to other types of containers than an underlying array. Then you mid-rule action become

Re: warning: unused value: $3

2006-10-25 Thread Hans Aberg
On 25 Oct 2006, at 22:13, [EMAIL PROTECTED] wrote: On Wednesday 25 October 2006 21:22, Hans Aberg wrote: On 25 Oct 2006, at 17:05, [EMAIL PROTECTED] wrote: My grammar set a number of attributes in an allocated structure using $0 to reference the structure on the stack. The full rules are as fo

Re: warning: unused value: $3

2006-10-25 Thread Joel E. Denny
On Wed, 25 Oct 2006, Hans Aberg wrote: > I think you should take away the use of $0, because it may no longer be > guaranteed, in view of that Bison is switching to other types of containers > than an underlying array. Then you mid-rule action becomes unnecessary. I must have forgotten that discu

Re: warning: unused value: $3

2006-10-25 Thread henrik . sorensen
On Wednesday 25 October 2006 21:22, Hans Aberg wrote: > On 25 Oct 2006, at 17:05, [EMAIL PROTECTED] wrote: > > My grammar set a number of attributes in an allocated structure > > using $0 to > > reference the structure on the stack. The full rules are as follow > > procoption: > > MAIN { if

Re: warning: unused value: $3

2006-10-25 Thread Hans Aberg
On 25 Oct 2006, at 17:05, [EMAIL PROTECTED] wrote: Hi Bison list, using bison version 2.2. Message from bison: pl1-parser.y:873.17-63: warning: unused value: $3 This warning I find a bit confusing... Line 873 contains: |procoptionlist ',' {$$=$1;} procoption {$$=$1;} $3 ref

warning: unused value: $3

2006-10-25 Thread henrik . sorensen
Hi Bison list, using bison version 2.2. Message from bison: pl1-parser.y:873.17-63: warning: unused value: $3 This warning I find a bit confusing... Line 873 contains: |procoptionlist ',' {$$=$1;} procoption {$$=$1;} $3 refers to the embedded action after the comma. My gra