Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c Subject: Re: question about shift operator Message-ID: <388@auspex.UUCP> Date: 2 Nov 88 09:24:40 GMT References: <786@gtx.com> Reply-To: guy@auspex.UUCP (Guy Harris) Distribution: na Organization: Auspex Systems, Santa Clara Lines: 12 > int n; > n <<= 32; > >K&R 1st ed. seems to indicate the operation is undefined, but does >the proposed standard change this? No. If you depend on it doing something in particular, you will lose. There exist quite common machines on which shift counts are not taken modulo the word size (68K) and quite common machines on which it is (80386), and chances are the compiler will just generate a shift instruction and not add extra code to check whether the shift count is larger than the word size.