Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jan 2001 14:23:36 -0800 (PST)
From:      Matthew Jacob <mjacob@feral.com>
To:        Tony Finch <dot@dotat.at>
Cc:        =?iso-8859-1?Q?G=E9rard_Roudier?= <groudier@club-internet.fr>, Peter Wemm <peter@netplex.com.au>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/isp isp.c
Message-ID:  <Pine.LNX.4.21.0101021420000.14503-100000@zeppo.feral.com>
In-Reply-To: <20010102133120.M47732@hand.dotat.at>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2 Jan 2001, Tony Finch wrote:

> Matthew Jacob <mjacob@feral.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0101021420000.14503-100000>