On Wed, 23 Aug 2006, Paul Eggert wrote:

> "Joel E. Denny" <[EMAIL PROTECTED]> writes:
> 
> > Moreover, it might be convenient to override a per-type or default
> > %destructor by defining an empty per-symbol %destructor, which would
> > suppress the warnings:
> >
> >   %destructor { free ($$); }
> >   %destructor { } symbol_with_no_value
> >
> > What do you think?
> 
> Sounds reasonable to me.  Akim?

To be clear, I was thinking that non-empty %destructor code that doesn't 
contain $$ would not trigger the warnings.  For example, the user may want 
to use %destructor just for messages to the user:

  %destructor {
    fprintf (stderr, "Warning: statement at line %d was discarded.\n",
             @$.first_line);
  } stmt

This scenario has nothing to do with the default or per-type %destructor.

Joel


Reply via email to