Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!ames!styx!mordor!jdb From: jdb@mordor.UUCP Newsgroups: comp.arch Subject: Re: Available no. of registers Message-ID: <1302@mordor.s1.gov> Date: Tue, 27-Jan-87 13:39:05 EST Article-I.D.: mordor.1302 Posted: Tue Jan 27 13:39:05 1987 Date-Received: Wed, 28-Jan-87 21:14:38 EST References: <3810002@nucsrl.UUCP> <926@mips.UUCP> <759@vaxb.calgary.UUCP> <213@ames.UUCP> <3510@amd.UUCP> Reply-To: jdb@mordor.UUCP (John Bruner) Organization: S-1 Project, LLNL Lines: 25 >Oh, what a mess!! One of the parts of C which is cleaned up in the ANSI >draft standard is the use of casts to convert pointer values. ... >The only conversions that may be performed on pointers is >to convert them to (void *) and back to the SAME type. On some machines, >the conversion to (char *) and back is possible, but this is implementation >defined behavior, and not portable. *Implicit* pointer conversion (without casts) is only permitted between a pointer to an object and a pointer to void. However, the draft ANSI standard (October 10, 1986, section 3.3.4) says that explicit conversions between other pointer types is allowed: A pointer to an object of one type may be converted to a pointer to an object of another type. The resulting pointer might not be valid if it is improperly aligned for the type of object pointed to. It is guaranteed, however, that a pointer to an object of a given alignment may be converted to a pointer to an object of a less strict alignment and back again; the result shall compare equal to the original pointer. (An object that has type char has the least strict alignment.) -- John Bruner (S-1 Project, Lawrence Livermore National Laboratory) MILNET: jdb@mordor.s1.gov (415) 422-0758 UUCP: ...!ucbvax!decwrl!mordor!jdb ...!seismo!mordor!jdb