This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] C undefined behavior fix
- From: dewar at gnat dot com
- To: Dautrevaux at microprocess dot com, dewar at gnat dot com, mrs at windriver dot com,paulus at samba dot org
- Cc: gcc at gcc dot gnu dot org, linux-kernel at vger dot kernel dot org,trini at kernel dot crashing dot org, velco at fadata dot bg
- Date: Wed, 9 Jan 2002 05:40:34 -0500 (EST)
- Subject: RE: [PATCH] C undefined behavior fix
<<This is especially true as it is a nuisance for some uses of "volatile" that
were intended by the standard (as is clear in notes refering to the use of
volatile for memory mapped IO) and are broken by this optimization.
>>
Right, of course this optimization should only be done if the compiler can
prove that no other volatile objects are accessed (that would also violate
the corresponding rule in the Ada standard).