From owner-cvs-all Tue Jan 2 14:24: 9 2001 From owner-cvs-all@FreeBSD.ORG Tue Jan 2 14:24:05 2001 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 9BDB237B400; Tue, 2 Jan 2001 14:24:04 -0800 (PST) Received: from zeppo.feral.com (IDENT:mjacob@zeppo [192.67.166.71]) by feral.com (8.9.3/8.9.3) with ESMTP id OAA22704; Tue, 2 Jan 2001 14:23:36 -0800 Date: Tue, 2 Jan 2001 14:23:36 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: Tony Finch Cc: =?iso-8859-1?Q?G=E9rard_Roudier?= , Peter Wemm , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/isp isp.c In-Reply-To: <20010102133120.M47732@hand.dotat.at> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 2 Jan 2001, Tony Finch wrote: > Matthew Jacob wrote: > > > >The whole approach ANSI seems to have taking is moronic since it's very clear > >to me that either you should have clear object attributes, or you should have > >the most permissive interpretation of default attributes. If you want to make > >an object have some other than default attribute, be specific- don't be > >ambiguous. > > It is actually clear in this case: literal strings are arrays of const > chars and therefore should not be modified. The ambiguity you are > complaining about is there so that implementers can either enforce > this or not, depending on hardware and/or OS support. I'm saying the latter, but the former is wrong too since the construct "XXXX" has no tag to it. It's an unnamed (and untyped) object. It happens to be taken as a const, and some implementations make this read-only. As soon as some assignment occurs that would make it non-const, the *helpful* language would go, "Oh, it was unnamed/untyped, but your actions have made the role now less ambiguous". Otherwise, the same argument could be made that all static data initializers are constant too- not just strings. Fooey. > > >Would it still be an error if the declaration had been static instead of > >(implicit auto)? > > Yes. Frick this. I'm going back to 2901 and FPS-160 microcode. -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message