bison-patches
[Top][All Lists]
Advanced

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

no $$ in %destructor = no unset value warnings?


From: Joel E. Denny
Subject: no $$ in %destructor = no unset value warnings?
Date: Wed, 23 Aug 2006 22:37:28 -0400 (EDT)

a. value is likely set/constructed = $$ appears in semantic action
b. value is likely destroyed = $$ appears in %destructor

That is, I think Bison shouldn't warn about !a when !b.  However, Bison 
currently considers a value to be likely destroyed by a %destructor 
regardless of whether $$ appears in the %destructor.  I think that's 
inconsistent.  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?

Joel




reply via email to

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