Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!warwick!steve From: steve@warwick.UUCP (Steve Rumsby) Newsgroups: net.lang.c++ Subject: Re: Compiler bug report (#2) Message-ID: <267@euclid.warwick.UUCP> Date: Thu, 20-Mar-86 06:20:00 EST Article-I.D.: euclid.267 Posted: Thu Mar 20 06:20:00 1986 Date-Received: Sat, 22-Mar-86 22:22:49 EST References: <261@euclid.warwick.UUCP> <869@inset.UUCP> Reply-To: steve@euclid.UUCP (Steve Rumsby) Distribution: net Organization: Maths Institute, Warwick University, UK Lines: 32 In article <869@inset.UUCP> dave@inset.UUCP (Dave Lukes) writes: >In article <261@euclid.warwick.UUCP> steve@warwick.UUCP (Steve Rumsby) writes: >> >> .... >> >> char *const foo = "hello world"; >> >> main() >> { >> char *cp = foo; >> } >> > >Surely you would expect that: the erroneous line SHOULD read: >> char *cp = (char *)foo; No, why? foo already *is* a (char *) - it just happens to be a constant one. Are you suggesting the we all should start writing int i = (int)42; After all, 42 isn't an "int", it's a "const int" isn't it :-) Seriously tho', why should I have to cast the value of foo from "char *const" to "char *" before I can use its value? Steve. -- Steve Rumsby. ...!ukc!warwick!steve.