Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: string assignment in C Message-ID: <8708@smoke.BRL.MIL> Date: 20 Oct 88 09:58:40 GMT References: <1988Oct11.143728.28627@gpu.utcs.toronto.edu> <6777@chinet.chi.il.us> <1414@imagine.PAWL.RPI.EDU> <790@paris.ics.uci.edu> <8696 <9710@haddock.ima.isc.com> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 8 In article <9710@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: -True in K&R C, but fixed in dpANS: "Identical string literals ... need not be -distinct. If the program attempts to modify a string literal ... the behavior -is undefined." [3.1.4] "This specification allows implementations to share -copies of [identical] strings." [R3.1.4] True. I was thinking of string-literal initialized char arrays, not pointers to string literals. Sorry.