From owner-freebsd-ports Tue Aug 10 18:39: 9 1999 Delivered-To: freebsd-ports@freebsd.org Received: from ycheng.wsl.sinica.edu.tw (ycheng.wsl.sinica.edu.tw [140.109.7.79]) by hub.freebsd.org (Postfix) with SMTP id B91D314BD4 for ; Tue, 10 Aug 1999 18:39:04 -0700 (PDT) (envelope-from ycheng@ycheng.wsl.sinica.edu.tw) Received: (qmail 16208 invoked by uid 508); 11 Aug 1999 01:39:43 -0000 Date: 11 Aug 1999 01:39:43 -0000 Message-ID: <19990811013943.16207.qmail@ycheng.wsl.sinica.edu.tw> From: ycheng@ycheng.wsl.sinica.edu.tw Cc: recipient list not shown: ; Subject: Problem in egcc2.95 port ? Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This Following code can be compile without worning in FreeBSD 3.2-STABLE using system default gcc and egcc 2.95, but core dump with egcc 2.95 in ports. The system is 'make world' about 4 days before. command to compile: cc *.m -Wall -o test -lobjc egcc *.m -Wall -o test -lobjc Thank you for your help ! --- /dev/null Wed May 6 04:32:27 1998 +++ DelegatePool.h Wed Aug 11 08:34:58 1999 @@ -0,0 +1,10 @@ +#include + +@interface DelegatePool : Object +{ + id a; +} +- (void) setDeleGate: anObject; +- forward:(SEL)aSel :(arglist_t)argFrame; +@end + --- /dev/null Wed May 6 04:32:27 1998 +++ DelegatePool.m Wed Aug 11 08:34:58 1999 @@ -0,0 +1,22 @@ + +#include "DelegatePool.h" + +@implementation DelegatePool + +- (void) setDeleGate: anObject +{ + a = anObject; +} + +- forward: (SEL)aSel :(arglist_t)argFrame +{ + void *ret = 0; + + if ([a respondsTo:aSel]) + { + ret = [a performv:aSel :argFrame]; + } + return ret; +} + +@end --- /dev/null Wed May 6 04:32:27 1998 +++ Int.h Wed Aug 11 08:34:58 1999 @@ -0,0 +1,11 @@ + +#include + +@interface Int : Object +{ + int i; +} +- (void) set: (int) val; +- (void) print; +@end + --- /dev/null Wed May 6 04:32:27 1998 +++ Int.m Wed Aug 11 08:34:58 1999 @@ -0,0 +1,17 @@ + +#include "Int.h" + +@implementation Int + +- (void) set: (int) val +{ + i = val; +} + +- (void) print +{ + printf("Inv val is %i\n", i); +} + +@end + --- /dev/null Wed May 6 04:32:27 1998 +++ main.m Wed Aug 11 08:34:57 1999 @@ -0,0 +1,16 @@ +#include "Int.h" +#include "DelegatePool.h" + +int main() +{ + id i; + id d; + + i = [[Int new] init] ; + d = [[DelegatePool new] init]; + [d setDeleGate: i]; + [d print]; + return 0; +} + + To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message