delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2008/05/01/08:49:44

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Message-ID: <48198879.4040106@iki.fi>
Date: Thu, 01 May 2008 12:08:09 +0300
From: Andris Pavenis <andris DOT pavenis AT iki DOT fi>
User-Agent: Thunderbird 2.0.0.12 (X11/20080226)
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: djgpp: djgpp/src/libemu/src/emu387.cc
References: <200805010832 DOT m418W89w006479 AT delorie DOT com>
In-Reply-To: <200805010832.m418W89w006479@delorie.com>
Reply-To: djgpp-workers AT delorie DOT com

This is a multi-part message in MIME format.
--------------090105030909080402030206
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

cvs-andris AT delorie DOT com wrote:
> Update by cvs id: andris
> Update of /cvs/djgpp/djgpp/src/libemu/src
> 
> Modified Files:
> 	emu387.cc 
> Log Message:
> Add brackets to make gcc-4.3.0 "happy".
> 

Patch does not fix all warnings from gcc-4.3.0 when compiling emu387.cc.
There is one warning still left:

make -C src
i586-pc-msdosdjgpp-gcc -pipe -MD -O2 -mtune=i586 -march=i386 -Wall  -Wcast-qual -Werror 
-Wpointer-arith -Wshadow  -Wwrite-strings -Wundef -Wcast-align -Wsign-compare -nostdinc -iquote . 
-isystem ../../../include -DGAS_MAJOR=2 -DGAS_MINOR=18 -DGAS_MINORMINOR=0 -c -fno-exceptions emu387.cc
cc1plus: warnings being treated as errors
emu387.cc: In function 'void fpatan()':
emu387.cc:2170: error: suggest parentheses around && within ||
make[3]: *** [emu387.o] Error 1
make[2]: *** [all_subs] Error 2
make[1]: *** [all] Error 2
make: *** [subs] Error 2

It seems that there is a bug in current code (at least it seems so looking
at another similar construction earlier in the same procedure). I don't however
know whether it is so. So I attached patch instead of committing the change.

Andris

--------------090105030909080402030206
Content-Type: text/x-patch;
 name="emu386.cc.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="emu386.cc.diff"

Index: emu387.cc
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libemu/src/emu387.cc,v
retrieving revision 1.16
diff -u -r1.16 emu387.cc
--- emu387.cc	1 May 2008 08:32:05 -0000	1.16
+++ emu387.cc	1 May 2008 08:53:20 -0000
@@ -2167,7 +2167,7 @@
     return;
   }
   if (st(1).tag == TW_S
-      && val_same(st(1), CONST_NINF) || val_same(st(1), CONST_PINF))
+      && (val_same(st(1), CONST_NINF) || val_same(st(1), CONST_PINF)))
   {
     char nsign = st(1).sign;
     st(1) = CONST_PI2;

--------------090105030909080402030206--

- Raw text -


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