From tijl@kalimero.kotnet.org  Tue Jul 27 09:41:07 2004
Return-Path: <tijl@kalimero.kotnet.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id BCD4B16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jul 2004 09:41:07 +0000 (GMT)
Received: from outmx018.isp.belgacom.be (outmx018.isp.belgacom.be [195.238.2.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0246A43D49
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jul 2004 09:41:07 +0000 (GMT)
	(envelope-from tijl@kalimero.kotnet.org)
Received: from outmx018.isp.belgacom.be (localhost [127.0.0.1])
        by outmx018.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id i6R9f4oX009151
        for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jul 2004 11:41:04 +0200
        (envelope-from <tijl@kalimero.kotnet.org>)
Received: from kalimero.kotnet.org (215.104-136-217.adsl.skynet.be [217.136.104.215])
        by outmx018.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id i6R9f2xw009131
        for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jul 2004 11:41:02 +0200
        (envelope-from <tijl@kalimero.kotnet.org>)
Received: from kalimero.kotnet.org (localhost [127.0.0.1])
	by kalimero.kotnet.org (8.12.11/8.12.11) with ESMTP id i6R9f1fp063313
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jul 2004 11:41:01 +0200 (CEST)
	(envelope-from tijl@kalimero.kotnet.org)
Received: (from tijl@localhost)
	by kalimero.kotnet.org (8.12.11/8.12.11/Submit) id i6R9f048063312;
	Tue, 27 Jul 2004 11:41:00 +0200 (CEST)
	(envelope-from tijl)
Message-Id: <200407270941.i6R9f048063312@kalimero.kotnet.org>
Date: Tue, 27 Jul 2004 11:41:00 +0200 (CEST)
From: Tijl Coosemans <tijl@ulyssis.org>
Reply-To: Tijl Coosemans <tijl@ulyssis.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] lang/sdcc: fix newgcc build failure
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         69653
>Category:       ports
>Synopsis:       [patch] lang/sdcc: fix newgcc build failure
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 27 09:50:09 GMT 2004
>Closed-Date:    Wed Jul 28 17:54:48 GMT 2004
>Last-Modified:  Wed Jul 28 17:54:48 GMT 2004
>Originator:     Tijl Coosemans
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
>Environment:
System: FreeBSD kalimero.kotnet.org 4.10-STABLE FreeBSD 4.10-STABLE #0: Thu Jun 17 18:20:56 CEST 2004 root@kalimero.kotnet.org:/usr/obj/usr/src/sys/KALIMERO i386
	
>Description:
There are a couple errors in the code of the following type:
error: ISO C++ forbids cast to non-reference type used as lvalue
http://pointyhat.freebsd.org/errorlogs/i386-5-full/sdcc-2.4.0.log
>How-To-Repeat:
	
>Fix:

Add patch-sim-ucsim-avr.src-arith_inst.cc to the ports files/ directory.

--- patch-sim-ucsim-avr.src-arith_inst.cc begins here ---
--- sim/ucsim/avr.src/arith_inst.cc.orig	Tue Jul 27 11:05:50 2004
+++ sim/ucsim/avr.src/arith_inst.cc	Tue Jul 27 11:09:08 2004
@@ -51,7 +51,7 @@
   if (D & 0x80)
     D|= ~0xff;
   t_mem sreg= ram->get(SREG);
-  (signed)result= (signed)D-(signed)K;
+  result= (signed)D-(signed)K;
   res= result & 0xff;
   
   sreg= sreg & ~(BIT_H|BIT_S|BIT_V|BIT_N|BIT_C|BIT_Z);
@@ -101,7 +101,7 @@
   if (D & 0x80)
     D|= ~0xff;
   t_mem sreg= ram->get(SREG);
-  (signed)result= (signed)D-(signed)K-(sreg&BIT_C)?1:0;
+  result= (signed)D-(signed)K-(sreg&BIT_C)?1:0;
   res= result & 0xff;
   ram->write(d, res);
   
@@ -151,7 +151,7 @@
     K|= ~0xff;
   if (D & 0x80)
     D|= ~0xff;
-  (signed)result= (signed)D-(signed)K;
+  result= (signed)D-(signed)K;
   res= result & 0xff;
   ram->write(d, res);
   
@@ -237,7 +237,7 @@
   if (D & 0x80)
     D|= ~0xff;
   t_mem sreg= ram->get(SREG);
-  (signed)result= (signed)D-(signed)R-(sreg&BIT_C)?1:0;
+  result= (signed)D-(signed)R-(sreg&BIT_C)?1:0;
   res= result & 0xff;
   
   sreg= sreg & ~(BIT_H|BIT_S|BIT_V|BIT_N|BIT_C);
@@ -287,7 +287,7 @@
   if (D & 0x80)
     D|= ~0xff;
   t_mem sreg= ram->get(SREG);
-  (signed)result= (signed)D-(signed)R-(sreg&BIT_C)?1:0;
+  result= (signed)D-(signed)R-(sreg&BIT_C)?1:0;
   res= result & 0xff;
   ram->write(d, res);
   
@@ -389,7 +389,7 @@
     R|= ~0xff;
   if (D & 0x80)
     D|= ~0xff;
-  (signed)result= (signed)D-(signed)R;
+  result= (signed)D-(signed)R;
   res= result & 0xff;
   
   t_mem sreg= ram->get(SREG) & ~(BIT_H|BIT_S|BIT_V|BIT_N|BIT_Z|BIT_C);
@@ -438,7 +438,7 @@
     R|= ~0xff;
   if (D & 0x80)
     D|= ~0xff;
-  (signed)result= (signed)D-(signed)R;
+  result= (signed)D-(signed)R;
   res= result & 0xff;
   ram->write(d, res);
   
@@ -922,7 +922,7 @@
     K|= ~0x3f;
   if (D & 0x8000)
     D|= ~0xffff;
-  (signed)result= (signed)D-(signed)K;
+  result= (signed)D-(signed)K;
   res= result & 0xffff;
   t_mem resl= res&0xff, resh= (res>>8)&0xff;
   ram->write(dl+1, resh);
--- patch-sim-ucsim-avr.src-arith_inst.cc ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Wed Jul 28 17:54:39 GMT 2004 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69653 
>Unformatted:
