[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %destructor feedback
From: |
Paul Eggert |
Subject: |
Re: %destructor feedback |
Date: |
Wed, 07 Dec 2005 09:31:49 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
>>> 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.
>
> Invalid seems like a strong word. You mean that some lint
> implementations warn about pointer arithmetic on locals and params?
I meant that the expression causes the code to fail to conform to the
C standard. The C Standard prohibits a program from subtracting 1
from a pointer to the start of an object. Not only might some lint
implementations warn about it, but (worse) some uses of the parser
might crash.
>> Why can't we simply rewrite the code so that it doesn't declare
>> unused variables?
>
> Is that computable in general?
Not with the current architecture, no. Not enough information is
available. We'd have to change the design slightly.
> perhaps the static global would be a reasonable temporary
> solution...
I'd rather have something simpler. The static global is asking for
trouble. It'd be better just to tell people to not use 'lint'.
- Re: %destructor feedback, (continued)
- Re: %destructor feedback, Paul Eggert, 2005/12/06
- Re: %destructor feedback, Joel E. Denny, 2005/12/06
- Re: %destructor feedback, Paul Eggert, 2005/12/06
- Re: %destructor feedback, Joel E. Denny, 2005/12/06
- Re: %destructor feedback, Paul Eggert, 2005/12/06
- Re: %destructor feedback, Joel E. Denny, 2005/12/06
- Re: %destructor feedback, Paul Eggert, 2005/12/06
- Re: %destructor feedback, Joel E. Denny, 2005/12/06
- Re: %destructor feedback, Paul Eggert, 2005/12/07
- Re: %destructor feedback, Joel E. Denny, 2005/12/07
- Re: %destructor feedback,
Paul Eggert <=
- Re: %destructor feedback, Joel E. Denny, 2005/12/07
- Re: %destructor feedback, Tzvetan Mikov, 2005/12/08
- Re: %destructor feedback, Joel E. Denny, 2005/12/08
- Re: %destructor feedback, Paul Eggert, 2005/12/08
- Re: %destructor feedback, Joel E. Denny, 2005/12/08
- 'lint' fixes for Bison-generated parsers, Paul Eggert, 2005/12/09
- Re: 'lint' fixes for Bison-generated parsers, Akim Demaille, 2005/12/12
- Re: 'lint' fixes for Bison-generated parsers, Paul Eggert, 2005/12/12
- Re: %destructor feedback, Akim Demaille, 2005/12/07
- Re: %destructor feedback, Joel E. Denny, 2005/12/07