[Top][All Lists]

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

Re: %destructor feedback

From: Joel E. Denny
Subject: Re: %destructor feedback
Date: Sat, 22 Oct 2005 20:25:26 -0400 (EDT)

On Sun, 23 Oct 2005, Frank Heckenbach wrote:

Yes. And it wouldn't be backward-compatible with older Bison
versions that don't have YYUSE. I guess one could #ifdef around it.

YYUSE is really a no-op.  In other words:


is nearly equivalent to:


The first would be compatible with any bison version. The second is mostly just for better code readability. If the user wants YYUSE plus backward compatibility, then he can just add his own definition for YYUSE #ifndef YYUSE. That's pretty simple. Is that what you meant?

However, I just noticed the current YYUSE definition doesn't allow the argument to be a struct instance. Paul, Akim, is this intentional?

OTOH, making the warning optional shouldn't take more than a global
flag in Bison unless I'm missing something.

If someone wants to implement the global flag, I won't argue. I just worry that...

(Newly written code
without backward-compatibility concerns could, and perhaps should,
still use YYUSE then, of course.)

few users will notice that YYUSE is better, most users will declare the global flag, and so the warnings will be a mostly useless feature.

Then again, we're getting ahead of ourselves. It hasn't yet been agreed that the warnings should even be implemented.


reply via email to

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