Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!ut-sally!ut-ngp!infotel!pollux!bobkat!m5d From: m5d@bobkat.UUCP Newsgroups: news.software.b,comp.lang.c Subject: Re: News for Xenix on PC AT ? Message-ID: <919@bobkat.UUCP> Date: Wed, 29-Apr-87 11:37:45 EDT Article-I.D.: bobkat.919 Posted: Wed Apr 29 11:37:45 1987 Date-Received: Fri, 1-May-87 06:58:12 EDT References: <18346@ucbvax.BERKELEY.EDU> <145@sds.UUCP> <17005@sun.uucp> <2440@ulysses.homer.nj.att.com> <148@sds.UUCP> Reply-To: m5d@bobkat.UUCP (Mike McNally (Man Insane)) Organization: Digital Lynx, Inc; Dallas, TX Lines: 27 Xref: utgpu news.software.b:550 comp.lang.c:1912 In article <148@sds.UUCP> dave@sds.UUCP (dave schmidt x194) writes: > . . . This, I admit, comes from working with brain-damaged compilers >that don't always the correct conversion; some recent C compilers for the >PC family don't properly compare 32-bit pointers to 16-bit int's. Only >the low 16-bits are checked, so you can get bit if you don't do the >cast yourself. At this point, many of you would say "It's a compiler >problem, not my problem". . . . > >Dave Schmidt Well, at this point I would say that you're confused if you think that comparison between int and pointer variables is defined at all. The only "integer" value defined to be usable in pointer comparisons is zero. It is NOT OK to compare an integer variable directly to a pointer. It is ok to cast the int explicitly to a pointer and then compare, but I don't know what this means on an iAPX 86-based compiler. I don't know what it would use for a segment value; probably zero, but it might use the current DS. In any case you'd probably want a library function to construct a pointer from two integers (or a long I guess). -- Mike McNally, mercifully employed at Digital Lynx --- Where Plano Road the Mighty Flood of Forest Lane doth meet, And Garland fair, whose perfumed air flows soft about my feet... uucp: {texsun,killer,infotel}!pollux!bobkat!m5d (214) 238-7474