From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c696,d10848107276edee X-Google-Attributes: gid10c696,public X-Google-Thread: 111c93,6331f57d343c4816 X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2002-11-05 20:41:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!bloom-beacon.mit.edu!panix!newsfeed.media.kyoto-u.ac.jp!snewsf0.syd.ops.aspac.uu.net!news1.optus.net.au!optus!tomato.tip.net.au!not-for-mail From: Kevin Easton Newsgroups: comp.os.linux.development.apps,comp.os.linux.alpha Subject: Re: segfault and gcc-2.96 Date: Wed, 6 Nov 2002 04:40:09 +0000 (UTC) Organization: The Internet Project, PC Users Group (ACT) Inc. Sender: Kevin Easton Message-ID: References: <3DC324DA.4C495AEC@lmco.nospam.com> <3DC70390.3C7CDB89@lmco.nospam.com> <878z08vonz.fsf@student.uni-tuebingen.de> NNTP-Posting-Host: tomato.pcug.org.au X-Trace: tomato.pcug.org.au 1036557609 3980 203.10.76.37 (6 Nov 2002 04:40:09 GMT) X-Complaints-To: usenet@tomato.pcug.org.au NNTP-Posting-Date: Wed, 6 Nov 2002 04:40:09 +0000 (UTC) User-Agent: tin/1.5.12-20020311 ("Toxicity") (UNIX) (Linux/2.4.18 (i686)) Xref: archiver1.google.com comp.os.linux.development.apps:27416 comp.os.linux.alpha:6573 In comp.os.linux.development.apps Falk Hueffner wrote: > JMK writes: > >> char *f1 = "default.str"; >> ... >> strcpy (f1, pfix); <-------- Program received signal SIGSEGV, > > String literals are not writable. They are of type const char*. Actually for historical reasons, they're of type char *, but their contents are still not modifiable. - Kevin.