Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!news From: scs@adam.mit.edu (Steve Summit) Newsgroups: comp.lang.c Subject: Re: volatile keyword - what does it mean? Keywords: volatile, GCC Message-ID: <1991Jun19.050822.21192@athena.mit.edu> Date: 19 Jun 91 05:08:22 GMT References: <1991Jun19.003124.28290@viewlogic.com> Sender: news@athena.mit.edu (News system) Reply-To: scs@adam.mit.edu Organization: Thermal Technologies, Cambridge, MA Lines: 17 In article <1991Jun19.003124.28290@viewlogic.com> kenc@suntan.viewlogic.com (Kenstir) writes: >It seems that GCC is assuming that `mbuf' is a pointer to a volatile >object, but that doesn't do me any good... > volatile char *mbuf; Though perhaps not immediately obvious, the answer can be found in the comp.lang.c frequently-asked questions list: 30. What's the difference between "char const *p" and "char * const p"? A: "char const *p" is a pointer to a constant character (you can't change the character); "char * const p" is a constant pointer to a (variable) character (i.e. you can't change the pointer). (Read these "inside out" to understand them. See question 63.) Steve Summit scs@adam.mit.edu