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 distribution should normally not issue any
> warnings - just confusing to the end user. But one should be able to use them
> at need while developing. So I think the normal thing is to not issue warnings
> on code that is perfectly legal, but having flags for enabling them. Isn't
> that what say GCC does for unused variables?

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 uses of Bison's original features 
(%destructor and associated unset/unused values), it's harder to justify 
warning about potentially valid uses of traditional Yacc features 
(mid-rule values used as $0 or $-n instead of $n).

It may be best to leave the mid-rule warnings off by default but activate 
them with -W.  I'll try to implement this soon unless I hear an argument 
otherwise.


_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to