From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,86ec22e070e319c0 X-Google-Attributes: gid103376,public From: robert_dewar@my-dejanews.com Subject: Re: How do I get this to work?? Date: 1999/01/06 Message-ID: <76uvjt$o0f$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 429288774 References: <76s0dp$1v4$1@nntp3.uunet.ca> <76tbvv$ba5$1@nntp3.uunet.ca> <36926c54.2583014@news.pacbell.net> X-Http-Proxy: 1.0 x7.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Jan 06 06:25:01 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-01-06T00:00:00+00:00 List-Id: In article <36926c54.2583014@news.pacbell.net>, tmoran@bix.com (Tom Moran) wrote: > NO. 'address is non-portable. For instance, one of the > compilers I use regularly uses the full Intel > segment:offset form, all 32 bits, for 'address, vs 32 > bits with (Win32's) implied segment for 'access. First, I assume you mean full 48 bits for the segment:offset form, since that is what it is in 32-bit mode, and surely you are talking about 32-bit mode here. If so, that is an extraordinarily bad choice for a compiler to make. Why? Because there is loads of legacy code around that assumes that an Address value can be passed to C as a pointer. A compiler that does not allow this usage is in my opinion badly flawed if you want to interface to C using it. Also, what makes you think that an access type is any more portable? There is NO reason to think this. The RM provides no guarantee at all that the representation of either access types or addresses corresponds to what a C pointer looks like. Any reasonable compiler will make both access types in at least the cases that make sense to C (e.g. simple types or constrained arrays, or non-variant records), and addresses be identical to C pointers. But if what you say is true, then there are unreasonable compilers around. If so, then all bets are off regarding portability of *either* access types *or* addresses across the C boundary. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own