delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/07/23/10:44:31

X-Authentication-Warning: kendall.sfbr.org: jeffw set sender to jeffw AT darwin DOT sfbr DOT org using -f
Date: Mon, 23 Jul 2001 09:44:16 -0500
From: JT Williams <jeffw AT darwin DOT sfbr DOT org>
To: djgpp-workers AT delorie DOT com
Subject: gcc 3.0 test
Message-ID: <20010723094416.A20877@kendall.sfbr.org>
Mail-Followup-To: djgpp-workers AT delorie DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
Reply-To: djgpp-workers AT delorie DOT com

GCC 3.0 development version is complaining about some things that GCC
2.7.2.1 accepted (with same compiler options).  Here is one I can't
figure out:

gcc  -g -O2 -W -Wall -Werror  -march=i386 -I/usr/include -c tarm.c
cc1.exe: warnings being treated as errors
tarm.c: In function `tarm':
tarm.c:58: warning: operation on `dsqrarg' may be undefined
tarm.c:58: warning: operation on `dsqrarg' may be undefined
make.exe: *** [tarm.o] Error 1

This is from compilation of a larger program; I can reproduce the error
with this trimmed version:

static double dsqrarg;
#define DSQR(a) ((dsqrarg=(a)) == 0.0 ? 0.0 : dsqrarg*dsqrarg)

int main(void)
{
    int xi,yj;
    double pxi,pyj,txy;

    pxi=pyj=0.25;
    xi=yj=1;
    txy = (xi == yj ? DSQR(pxi) : DSQR(pxi) + DSQR(pyj));
    return 0;
}

Any ideas?
TIA/jtw

Tools:
  DOS 5.0
  djdev 2.03 (stock, not CVS)
  bnu-2.11.2
  gcc-3.0 GCC 3.0 C compiler binaries for DJGPP (WARNING: development version)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019