VMS pointer problems continue.

John Myers jgm at K.GP.CS.CMU.EDU
Sat Mar 26 01:34:03 AEST 1988


In article <1494 at se-sd.sandiego.NCR.COM> rns at 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 at cs.cmu.edu
			LoseNet:  ...!seismo!hao!wiscvm.wisc.edu!k!nobody



More information about the Comp.lang.c mailing list