Path: utzoo!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!ucsdhub!ucsd!nosc!helios.ee.lbl.gov!pasteur!ames!mailrus!uflorida!novavax!proxftl!bill From: bill@proxftl.UUCP (T. William Wells) Newsgroups: comp.lang.c Subject: Re: const comparison in C and C++ Message-ID: <805@proxftl.UUCP> Date: 22 Sep 88 00:33:43 GMT References: <709@paris.ICS.UCI.EDU> <8500@smoke.ARPA> <1411@solo3.cs.vu.nl> <8516@smoke.ARPA> <785@proxftl.UUCP> <8529@smoke.ARPA> Reply-To: bill@proxftl.UUCP (T. William Wells) Organization: Proximity Technology, Ft. Lauderdale Lines: 25 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <8529@smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) writes: : In article <785@proxftl.UUCP> bill@proxftl.UUCP (T. William Wells) writes: : >In article <8516@smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: : >: void copy(const char *source, char *destination, unsigned count); : >: ... modification of any storage validly accessible via : >: the second parameter is NOT prohibited. : >Sorry Doug, it's undefined. : : Sorry yourself, it's the way I stated. : : >"If an attempt is made to modify an object defined with a : >const-qualified type through use of an lvalue with : >non-const-qualified type, the behavior is undefined." : : This is simply not relevant. The parameter declarations do not define : objects. I see what you mean. I didn't interpret the "defined with" when reading the section. And I'm not *too* sorry because this means I don't have to go and fix up that copy routine (and a few others) in our library. :-) --- Bill novavax!proxftl!bill