Compilers and programming style (was Re: A question of style)
Scott Amspoker
scott at bbxsda.UUCP
Thu Jan 11 03:04:12 AEST 1990
In article <28716 at amdcad.AMD.COM> tim at amd.com (Tim Olson) writes:
>In article <534 at bbxsda.UUCP> scott at bbxsda.UUCP (Scott Amspoker) writes:
>| In article <2283 at dataio.Data-IO.COM> bright at dataio.Data-IO.COM (Walter Bright) writes:
>| >volatile int *p;
>| >*p; /* has side effects and must not be optimized away */
>|
>| Just curious - what kind of code should be generated for the above
>| C fragment?
>
>The integer pointed to by p should be accessed from memory and thrown
>away (this may be useful in talking to certain peripheral devices).
By "should" I assume you mean that this is in the ANSI specification?
--
Scott Amspoker
Basis International, Albuquerque, NM
(505) 345-5232
unmvax.cs.unm.edu!bbx!bbxsda!scott
More information about the Comp.lang.c
mailing list