This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/42126] gcc optimizes line away/optimizes to an endless loop
- From: "codemasterhs at yahoo dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Nov 2009 09:02:08 -0000
- Subject: [Bug c/42126] gcc optimizes line away/optimizes to an endless loop
- References: <bug-42126-16316@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from codemasterhs at yahoo dot de 2009-11-21 09:02 -------
(In reply to comment #4)
> The pointer is not declared volatile.
>
> static struct smpMsg_t * volatile freeList;
>
> would be a volatile pointer.
>
Ok, this worked. So where has to be the volatile keyword, so that everything
works? I mean I thought "volatile TYPE (like int, char and so on) foo" is
right, isn´t it? Or does this only not work for pointers?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42126