From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,f9bcef78c4b3c0ab X-Google-Attributes: gid109fba,public X-Google-Thread: 1164f8,f9bcef78c4b3c0ab X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,f9bcef78c4b3c0ab X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-03-23 14:03:01 PST Xref: gmd.de comp.unix.osf.osf1:2649 comp.sys.dec:14593 comp.lang.c++:50213 Path: gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!udel!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!crl.dec.com!crl.dec.com!utne.zk3.dec.com!sauron.zk3.dec.com!gaf From: gaf@zk3.dec.com (Gerald Feldman USG) Newsgroups: comp.unix.osf.osf1,comp.sys.dec,comp.lang.c++ Subject: Re: Comparing 64-bit pointers with Alpha cxx Date: 23 Mar 1994 22:03:01 GMT Organization: Digital Equipment Corporation, Unix Systems Group Distribution: world Message-ID: <2mqeal$r72@utne.zk3.dec.com> References: Reply-To: gaf@zk3.dec.com NNTP-Posting-Host: sauron.zk3.dec.com X-Newsreader: mxrn 6.18-5 Originator: gaf@sauron.zk3.dec.com In article , coates@kelvin.physics.uq.oz.au (Tony Coates) writes: We have just received the DEC cxx compiler for our AXP (Alpha) running OSF/1.3. We don't have the printed documentation for it yet, unfortunately. I am having a problem, because I need to compare two pointers. It appears that cxx, like the DEC c89 C compiler, doesn't support 64-bit integer data types, for some arcane reason. And, unfortunately, the pointer comparison (<) seems to first require an implicit conversion to an integer type. So, I am getting warmings about conversion of pointers to a type which is too small, which I consider a pretty serious warning. Can anyone give me a hint as to how one can compare 64-bit pointers, or how to avoid this implicit conversion to integer? I would be really grateful for any hints at all that anyone can give to me. Thanks for any help in advance, Cheers, Tony. -- _____________________________________________________________________________ A.B.Coates, Dept. of Physics, The University of Queensland QLD 4072 Australia. Email: coates@physics.uq.oz.au Phone: (07/+617) 365-3424 Fax: (07/+617) 365-1242 Disclaimer: The University is ignorant of my opinions, let alone guilty ... _____________________________________________________________________________ Tony, I just tested a short program using DEC Cxx. #include int main() { printf("sizeof long%ld, sizeof int:%ld\n", sizeof(long), sizeof(int)); } sauron:test/qar/library {898%} a.out sizeof long8, sizeof int:4 I did test on both V2.0 system and a V1.3 system. Also, a comparison of 2 pointers should never be converted to arithmetic types. (Refer to ANSI 3.3.8). I think that the version of CXX on the V1.3 system I tested on was the released version of DEC CXX. I do know that the version on my V2.0 system is not yet released. -- Jerry Feldman -- Jerry Feldman Unix Systems Group Digital Equipment Corp. Mailstop: ZKO3-3/Y25 110 Spitbrook Rd. gaf@zk3.dec.com Nashua, NH 03062-9987 (603)881-2970