Article View: comp.std.c++
Article #951Re: Conversions to/from void*, redux
From: Chip Salzenberg
Date: Fri, 15 Mar 1991 00:47
Date: Fri, 15 Mar 1991 00:47
34 lines
2234 bytes
2234 bytes
According to jimad@microsoft.UUCP (Jim ADCOCK):
>I claim C++ *ought to* allow such implementations [that distinguish
>between primitive types and user-defined types]. Such implementations
>could be interesting *at least* on lisp-machines, Rekursiv-like "OO"
>architectures, and on risc machines with 48-bit pointers.
Agreed on the "interesting" count, except for the last: RISC machines
are quite well cared for by the current language definition.
I must admit that it is not until now that I realize the purpose of
Jim's statements. He does not speak to what C++ *is* (the subject on
which I have concentrated), but of what it *should be* (in his
opinion, of course). I apologize to all readers, especially Jim, for
previous articles which may have been unnecessarily critical due to my
not having grasped this point.
>On at least some such machines, the tagged pointers might have 48-bit
>representations, the primitive pointers have 32-bit representations.
>The 48-bit pointers would be type-tag + ram-address, whereas the 32-bit
>pointers would be ram-address only. Thus conversion from class X* to
>char* [for example] really would represent loss of information ...
Ah, a concrete example! Thank you; it is quite helpful. It sounds
very interesting, too, with a lot of potential for error checking,
among other things. I'll keep it in mind.
>Should the C++ language be specified in such a way so as to prohibit,
>for all time, any such implementations/CPUs ???
It is a truism that no language can be all things to all people.
--
Chip Salzenberg at Teltronics/TCT <chip@tct.uucp>, <uunet!pdn!tct!chip>
"Most of my code is written by myself. That is why so little gets done."
-- Herman "HLLs will never fly" Rubin
Technical Details
Message-ID:
<27E01998.6483@tct.uucp>Path:
arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uunet!pdn!tscs!tct!chipReferences:
<27D5708A.29CF@tct.uucp> <3568@ux.acs.umn.edu> <71210@microsoft.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uunet!pdn!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.std.c++ Subject: Re: Conversions to/from void*, redux Keywords: Sun, C++ Message-ID: <27E01998.6483@tct.uucp> Date: 15 Mar 91 00:47:19 GMT References: <27D5708A.29CF@tct.uucp> <3568@ux.acs.umn.edu> <71210@microsoft.UUCP> Organization: Teltronics/TCT, Sarasota, FL Lines: 34