Date: Thu, 20 Feb 1997 19:01:18 +0200 (IST) From: Eli Zaretskii To: Benjamin D Chambers cc: djgpp AT delorie DOT com Subject: Re: Custom Stack? In-Reply-To: <19970220.081756.4935.1.chambersb@juno.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 20 Feb 1997, Benjamin D Chambers wrote: > >buf+40 is not the same as &buf[10], because of pointer arithmetics > >rules. &buf[10] is the same as buf+10 or (char *)buf + 40. > > > Except that buf is an int *, and each int is 4 bytes, right? So wouldn't > that make it buf + 40? Or does gcc automagically * size_of (or whatever)? Of course, it does. Every C compiler does that. That's what I meant when I said ``pointer arithmetics rules''.