Path: utzoo!utgpu!watmath!clyde!att!pacbell!ames!ncar!tank!mimsy!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: preventing sign extension Keywords: bitmask sign extension Message-ID: <9333@smoke.BRL.MIL> Date: 11 Jan 89 08:13:56 GMT References: <905@thor.stolaf.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 9 In article <905@thor.stolaf.edu> edf@rocky2.rockefeller.edu writes: >#define INTMASK (long) ((unsigned) (0)) Almost certainly this was supposed to be #define INTMASK ((long)(unsigned)~0) The form you gave should not have worked on ANY C compiler. Are you reading that from a magazine listing? They're notorious for goofing up "funny" symbols like ~, `, and \.