This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A TOT bug in handling volatile vars?
- From: Dale Johannesen <dalej at apple dot com>
- To: Ziemowit Laski <zlaski at apple dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 6 Sep 2002 17:56:58 -0700
- Subject: Re: A TOT bug in handling volatile vars?
On Friday, September 6, 2002, at 05:33 PM, Ziemowit Laski wrote:
So my question for the experts is, is this a bug? Personally, I
think so. Had v1 _not_ been marked volatile, I could see the
compiler deciding that 'v1=NULL;' is dead code (assuming that
it does not recognize the magical powers of longjmp -- does it
have to, anyway?).
Yes.
But since v1 _is_ volatile, I would expect
the store to be emitted anyway.
I agree entirely. This is a bug. Since it's of long standing, and
since volatile and setjmp are among the standard things people try
when they're trying to break a compiler, it's likely there's a GNATS
entry for it.