Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!usc!rutgers!mcnc!ecsvax.uncecs.edu!jrw From: jrw@uncecs.edu (James R. White) Newsgroups: comp.os.minix Subject: Re: TurboC+1.5.5 protected mode bug Summary: Oops, should have used (unsigned) rather than (int) Message-ID: <1990Mar25.140948.23610@uncecs.edu> Date: 25 Mar 90 14:09:48 GMT References: <1990Mar25.054215.18952@uncecs.edu> Organization: UNC Educational Computing Service Lines: 8 [problem with Turbo C 2.0 compiling 1.5.5 where a pointer would be cast to a long and TC would put the segment in the upper part.] Oops. My solution was to cast to an (int) before casting to a (long). Bruce Evans has pointed out to me that casting to an (unsigned) would be better because (long)(int) will sign extend while (long)(unsigned) won't. I got away with (int) because I'm using separate I&D and so all the pointers being converted were less than 0x8000.