target/3506: weird behaviour when incrementing volatile ints
Herbert Xu
herbert@gondor.apana.org.au
Wed Apr 3 02:36:00 GMT 2002
The following reply was made to PR target/3506; it has been noted by GNATS.
From: Herbert Xu <herbert@gondor.apana.org.au>
To: rth@gcc.gnu.org, 89949-quiet@bugs.debian.org, gcc-bugs@gcc.gnu.org,
gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: target/3506: weird behaviour when incrementing volatile ints
Date: Wed, 3 Apr 2002 20:29:27 +1000
On Fri, Mar 29, 2002 at 10:42:35AM -0000, rth@gcc.gnu.org wrote:
> Synopsis: weird behaviour when incrementing volatile ints
>
> State-Changed-From-To: open->closed
> State-Changed-By: rth
> State-Changed-When: Fri Mar 29 02:42:35 2002
> State-Changed-Why:
> GCC doesn't know what constitutes a reference to a volatile memory,
> so it never performs operations on them directly. It will always
> pull the value into a register first.
This breaks C99 wrt sig_atomic_t. The increment has to be a single
instruction.
--
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
More information about the Gcc-prs
mailing list