Re: void * in ANSC
Army1987 <army1...@NOSPAM.it> wrote:
> Keith Thompson wrote:
> > In C99 6.5.3.2, the only constraint for the unary "*"
> > operator is:
> >
> > The operand of the unary * operator shall have pointer
> > type. and void* is a pointer type. Obviously there's very
> > little you can do with the result, but this:
> >
> > void *ptr = /* some non-null value */
> > *ptr;
> >
> > appears to be legal (though not particularly useful).
>
> This has a curious consequence:
> volatile void *ptr = SOMEWHERE;
> *ptr;
>
> How many bytes does that access?
None. [How many bytes does any other void expression access?]
--
Peter
|