From owner-cvs-all Thu Sep 6 8: 1:17 2001 Delivered-To: cvs-all@freebsd.org Received: from arb.arb.za.net (arb.arb.za.net [196.7.148.4]) by hub.freebsd.org (Postfix) with ESMTP id 9C3A937B401; Thu, 6 Sep 2001 08:01:06 -0700 (PDT) Received: (from uucp@localhost) by arb.arb.za.net (8.11.3/8.11.3) with UUCP id f86F14a67008; Thu, 6 Sep 2001 17:01:04 +0200 (SAST) (envelope-from mark@grondar.za) Received: from grondar.za (localhost [127.0.0.1]) by grimreaper.grondar.za (8.11.6/8.11.4) with ESMTP id f85AH2k99078; Wed, 5 Sep 2001 11:17:02 +0100 (BST) (envelope-from mark@grondar.za) Message-Id: <200109051017.f85AH2k99078@grimreaper.grondar.za> To: Maxim Sobolev Cc: markm@FreeBSD.ORG (Mark Murray), cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/su Makefile su.c References: <200109041844.f84Iijw98897@vega.vega.com> In-Reply-To: <200109041844.f84Iijw98897@vega.vega.com> ; from Maxim Sobolev "Tue, 04 Sep 2001 21:44:44 +0300." Date: Wed, 05 Sep 2001 11:17:01 +0100 From: Mark Murray Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > > > markm 2001/09/04 10:10:57 PDT > > > >[...] > > > > This solves the problem (in my own mind) of how a "const char *" _ever_ > > actually gets a value in a WARNS=2 world. > > const char *foo = "bar"; ??? Right :-). Now how do you get (variable) stuff into a 'const char *'? For example - a function is not allowed to modify its arguments, so they are const, but the stuff being passed in is by no means constant. That one is easy - you can pass a 'foo *' into a 'const foo *'. Now, how do you build up a 'const foo *' in such a way that you can, but nobody else can? Like perl's un-tainting, C needs a formal un-consting, and I guess this is it. M -- Mark Murray Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message