X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <10203031643.AA28229@clio.rice.edu> Subject: Re: libm signed/unsigned warnings To: djgpp-workers AT delorie DOT com Date: Sun, 3 Mar 2002 10:43:23 -0600 (CST) In-Reply-To: <200203031419.g23EJBH06559@mother.ludd.luth.se> from "Martin Str|mberg" at Mar 03, 2002 03:19:10 PM X-Mailer: ELM [version 2.5 PL2] Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > How about this: > Index: djgpp//src/libm/math/e_pow.c > - __uint32_t lx,ly; > + __uint32_t lx,ly,ju; > if(k>20) { > - j = ly>>(52-k); > - if((j<<(52-k))==ly) yisint = 2-(j&1); > + ju = ly>>(52-k); > + if((ju<<(52-k))==ly) yisint = 2-(ju&1); > } else if(ly==0) { Once again, I like this much better. It uses the right type declaration, and may even fix subtile bugs. An extra temp declaration of the right type may even make the compiler's job easier. That is, assuming that someone didn't purposly use a signed in this code someplace to get that different behavior ...