Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 beta 3/9/83; site encore.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!encore!ptw
From: ptw@encore.UUCP (P. Tucker Withington)
Newsgroups: net.lang.c
Subject: Re: How does one construct a mask for the MS bit?
Message-ID: <177@encore.UUCP>
Date: Mon, 4-Mar-85 12:03:47 EST
Article-I.D.: encore.177
Posted: Mon Mar  4 12:03:47 1985
Date-Received: Wed, 6-Mar-85 03:04:31 EST
References: <8849@brl-tgr.ARPA>
Reply-To: ptw@encore.UUCP (P. Tucker Withington)
Organization: Encore Computer Corp., Wellesley Hills, MA
Lines: 13
Summary: 

>> This would require generation of a mask for the most significant bit

It should be easy to make a constant that masks a machine's "high" bit, but
as I mentioned a while back, ~(~(unsigned)0>>1) croaks pcc in a static
declaration; apparently because it does not know how to simplify casts in a
constant.  (It works fine as auto or in an expression, but then you're doing
unnecessary work at run time, especially if you made it a #define.)

The only feedback I got was that you "should" be allowed to have casts in a
constant; that they were "accidentally" left out of K&R...

                               o.o      --tucker
                                ~