Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!cornell!rochester!PT.CS.CMU.EDU!K.GP.CS.CMU.EDU!jgm From: jgm@K.GP.CS.CMU.EDU (John Myers) Newsgroups: comp.lang.c Subject: Re: VMS pointer problems continue. Message-ID: <1223@PT.CS.CMU.EDU> Date: 25 Mar 88 15:34:03 GMT References: <12602@brl-adm.ARPA> <812@cresswell.quintus.UUCP> <1494@se-sd.sandiego.NCR.COM> Sender: netnews@PT.CS.CMU.EDU Organization: System/Technology Development Corp. Lines: 14 In article <1494@se-sd.sandiego.NCR.COM> rns@se-sd.sandiego.NCR.COM (Rick Schubert) writes: :>Although Richard A. O'Keefe has pointed out the primary error in this :>program, and probably the one that caused Mike Ayers' problem, there is :>another error, although most implementations of C will handle it in the :>intended way (notice that I did not say "the right way"). The string :>pointed to by b ("Arf!") should be considered local to wr(); the compiler :>is free to allocate it on the stack [...] Wrong. String constants have storage class "static" according to K&R Appendix A, section 2.5. Please check your references before you post. -- _.John G. Myers Internet: John.Myers@cs.cmu.edu LoseNet: ...!seismo!hao!wiscvm.wisc.edu!k!nobody