[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: Tue, 6 Dec 2005 20:07:23 -0500 (EST)

On Tue, 6 Dec 2005, Paul Eggert wrote:

If you're talking about this one:

 static int yyunused;
 #define YYUSE(e) yyunused = (int*) &(e) && yyunused

Yes, but minus the unnecessary cast I accidentally left in.

then I suspect it will also run afoul of lint implementations that
deduce that &(e) can never be null, and print a warning.

Would (&(e)-1) solve that? I'd test this myself, but I don't have such a lint, and I figure you might already know the answer.

Also, I don't like having an unnecessary static variable around.

Yeah, it's not elegant.

Also, it won't work if e is declared to be a register, as you can't take addresses of registers.

I didn't know that. Do people still do that? It could be documented that no parse param should be declared as a register.


reply via email to

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