Type modifiers in C

Eugene D. Brooks III brooks at lll-crg.ARpA
Sat Oct 26 13:52:19 AEST 1985


In considering some new type modifiers that are useful for multiprocessing
one needs to consider how type modifiers fit in the ANSI standard.
Could someone explain all the details of what you might do with for example
the volatile type modifier.  For instance does

volatile int foo;	/* Mean that the int foo is volatile. */

int * volatile bar;	/* Mean that bar is a non volatile pointer
			to a volatile int. */

int * volatile cat();	/* Mean that cat returns a pointer to a volatile int. */

volatile int cat();	/* What does this mean? */

volatile int * dog;	/* Mean that dog is a volatile pointer to a
			non-volatile int. */

volatile int * volatile fly;	/* Mean a volatile pointer to a volatile int. */


The draft of the ANSI standard is rather sketchy here and understanding
the semantics clearly would allow one to figure out what to do for the
type modifiers that are being considered.

							Thanks,
							Eugene



More information about the Comp.lang.c mailing list