Discussion: void * in ANSC
Afficher un message
Vieux 04/02/2008, 06h05   #12
Peter Nilsson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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
  Réponse avec citation
 
Page generated in 0,05105 seconds with 9 queries