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.

Joel


_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to