bug-bison
[Top][All Lists]
Advanced

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

Re: %destructor feedback


From: Paul Eggert
Subject: Re: %destructor feedback
Date: Tue, 06 Dec 2005 23:53:39 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

"Joel E. Denny" <address@hidden> 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?




reply via email to

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