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: jamagallon at able dot es, pbarada at mail dot wm dot sps dot mot dot com
- Cc: Dautrevaux at microprocess dot com, dewar at gnat dot com, gcc at gcc dot gnu dot org,groudier at free dot fr, jtv at xs4all dot nl, linux-kernel at vger dot kernel dot org,paulus at samba dot org, tim at hollebeek dot com, trini at kernel dot crashing dot org,velco at fadata dot bg
- Date: Wed, 9 Jan 2002 20:22:29 -0500 (EST)
- Subject: Re: [PATCH] C undefined behavior fix
Peter said
<<Then the code can be optimized to 'b = 0;' since nowhere in the scope
of 'a' does anyone take its address(which would allow it to be changed).
Of course if 'a' is external then another function can access its
address.
>>
Well if nothing else this shows that there is still significant disagreement.
I consider Peter's statement to be 100% wrong here, optimizing away the
access to b would be a clear violation of the standard. I thought that
the argument had been made in a clear and convincing manner, but apparently
some people completely refuse to be convinced!