Date: 11 Aug 1999 01:39:43 -0000 From: ycheng@ycheng.wsl.sinica.edu.tw Cc: recipient list not shown: ; Subject: Problem in egcc2.95 port ? Message-ID: <19990811013943.16207.qmail@ycheng.wsl.sinica.edu.tw>
next in thread | raw e-mail | index | archive | help
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 <objc/Object.h> + +@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 <objc/Object.h> + +@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990811013943.16207.qmail>