Alan Gillespie wrote:
>
> pete <> wrote in message news:<>...
> > Alan Gillespie wrote:
> > >
> > > > > > unsigned char *src, *end;
> > > > > > size_t bufsiz;
> > > > > > ...
> > > :
> > > :
> > > :
> > > >
> > > > If bufsiz is of type ptrdiff_t, then the expression
> > > > ((end - src) > bufsiz)
> > > > is valid as long as end and src point to the same object,
> > > > or one byte past.
> > > >
> > >
> > > A pedant would say you mean one "char" past.
> > > The standard leaves the precise
> > > size of a char to the implementation.
> >
> > Pedant that I am,
> > I say that you don't know what you're talking about.
> >
> > N869
> > 6.5.3.4 The sizeof operator
> > Semantics
> > [#3]
> > When applied to an operand that has type char, unsigned char,
> > or signed char, (or a qualified version thereof) the result is 1.
>
> That is defining the sizeof operator, not the size of a char.
>
> The sizeof operator gives the size of its operand in chars, not bytes.
> Standard C has no notion of a byte.
>
> Now who doesn't know what he's talking about?
You, and worse today than yesterday.
Richard Bos made a post 5 minutes ago,
in response to your post in the
Re:size of array??
thread, quoting N869 and explaining what Micah Cowan has already
explained to you in this thread.
I always avoid making posts which make it appear as though
it is substantially easier for me to post than to:
1 access a copy of the standard
2 acess a compiler
http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/