"Joel E. Denny" <[EMAIL PROTECTED]> writes: >> #define YYUSE(e) (yyunused = &(e) && yyunused)
>> 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? No, because that's an invalid expression: it normally has undefined behavior, and 'lint' is within its rights to warn about it. >> 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? Have register variables? Yes, occasionally. > It could be documented that no parse param should be declared as a > register. The more I think of it, the more I think we're heading down the wrong direction here. It'd be better to get rid of YYUSE entirely than have lots of arcane restrictions like this, or to worry about which versions of lint do what. Why can't we simply rewrite the code so that it doesn't declare unused variables?
