[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warning: unused value: $3

From: Joel E. Denny
Subject: Re: warning: unused value: $3
Date: Thu, 26 Oct 2006 16:55:55 -0400 (EDT)

On Thu, 26 Oct 2006 address@hidden 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.  Perhaps that would be clear 
if the message were reworded.

> > Surely it's useful in many cases, but could something be 
> > changed about it to accommodate the troublesome cases?  Or is it ok as is?
> the best thing would to detect that the $3 in rule procoptionlist is 
> referenced as $0 in procoption

In general, that seems difficult to compute because $0 or $-n could appear 
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.

What if we simply add an option to turn this warning off globally?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]