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: fw at deneb dot enyo dot de, paulus at samba dot org
- Cc: gcc at gcc dot gnu dot org, linux-kernel at vger dot kernel dot org,linuxppc-dev at lists dot linuxppc dot org, trini at kernel dot crashing dot org,velco at fadata dot bg
- Date: Fri, 4 Jan 2002 07:15:21 -0500 (EST)
- Subject: Re: [PATCH] C undefined behavior fix
<<But this is not the memory model of C! Adding an offset to a pointer
is an operation involving objects defined by the C language, and not
machine registers. Sometimes, this makes a noticeable difference.
>>
Indeed Alex Stepanov notes that Ada unlike C, *does* have general pointer
arithmetic, assuming a linear address space, and finds the lack of this in
C a problem :-) :-)