Article View: gnu.gcc.bug
Article #1343-0LL generates overflow message (GCC 2.3.1)
From: Paul Eggert
Date: Tue, 10 Nov 1992 19:30
Date: Tue, 10 Nov 1992 19:30
38 lines
1302 bytes
1302 bytes
For the program
long long x = -0LL;
GCC 2.3.1 (sparc, SunOS 4.1.2) wrongly reports:
t.c:1: warning: overflow in constant expression
Here is a patch.
Tue Nov 10 19:12:13 1992 Paul Eggert (eggert@twinsun.com)
* fold-const.c (neg_double): Don't report overflow with -0.
===================================================================
RCS file: fold-const.c,v
retrieving revision 2.3.1.6
diff -c -c -r2.3.1.6 fold-const.c
*** fold-const.c 1992/11/05 01:53:38 2.3.1.6
--- fold-const.c 1992/11/10 19:12:13
***************
*** 224,230 ****
{
*lv = 0;
*hv = - h1;
! return same_sign (h1, *hv);
}
else
{
--- 224,230 ----
{
*lv = 0;
*hv = - h1;
! return (*hv & h1) < 0;
}
else
{
Technical Details
Message-ID:
<9211101930.AA17739@farside.twinsun.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!twinsun.COM!eggertShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!twinsun.COM!eggert From: eggert@twinsun.COM (Paul Eggert) Subject: -0LL generates overflow message (GCC 2.3.1) Message-ID: <9211101930.AA17739@farside.twinsun.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 10 Nov 1992 19:30:40 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 39