Article View: comp.std.c
Article #4721Re: Two questions - Pointer equality and ...
From: David Sachs
Date: Wed, 31 Jan 1996 03:47
Date: Wed, 31 Jan 1996 03:47
18 lines
1316 bytes
1316 bytes
Dan Pop <danpop@mail.cern.ch> writes: ... >The full answer is in ANSI classic 3.1.4: > Identical string literals of either form need not be distinct. If > the program attempts to modify a string literal of either form, the > behavior is undefined. I think it is rather unfortunate, that "const" came in so late. Logically the proper tye of a string literal should be const char* rather than char*, but there is just too much code written with the old usage, for such a change to ever be feasible. -- * IRS, IRS, lord of the federal tax, checking all income and every deduction, * * mailing out form 10 40, penalizing noncompliers, regulating, and auditing. * David Sachs - Fermilab, HPPC MS369 - P. O. Box 500 - Batavia, IL 60510 Voice: 1 708 840 3942 Deparment Fax: 1 708 840 3785
Technical Details
Message-ID:
<4emonm$kqc@fnclub.fnal.gov>Path:
arc1-ca.pugleaf.net!fnnews.fnal.gov!not-for-mailReferences:
<4elq8a$j0b@taurus.fccc.edu> <TANMOY.96Jan30150808@qcd.lanl.gov> <9601310155.AA07417@dxmint.cern.ch>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fnnews.fnal.gov!not-for-mail From: b91926@fnclub.fnal.gov (David Sachs) Newsgroups: comp.std.c Subject: Re: Two questions - Pointer equality and ... Date: 30 Jan 1996 21:47:02 -0600 Organization: FERMILAB, Batavia, IL Message-ID: <4emonm$kqc@fnclub.fnal.gov> References: <4elq8a$j0b@taurus.fccc.edu> <TANMOY.96Jan30150808@qcd.lanl.gov> <9601310155.AA07417@dxmint.cern.ch> Reply-To: sachs@fnal.fnal.gov NNTP-Posting-Host: fnclub.fnal.gov X-Newsreader: NN version 6.5.0 #2 (NOV)