[Bug libobjc/13834] New: forward / performv broken
gavin at ipalsoftware dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 23 17:10:00 GMT 2004
forward / performv appears to be completely broken in the gcc 3.x series. Below
is a test program.
Expected output is:
hello world
hello world
This is the output generated by gcc 2.96.
Output under gcc 3.3.2 is:
hello world
hello õÿ¿ýO@ð¿Ãöÿ¿ð¿
This may be related to bug 429 "-forward:: / -performv:: does not work with
floats/structs" but as far as I can tell forward/performv is not working with
anything now.
#include <objc/Object.h>
#include <stdio.h>
@interface Obj1 : Object
{
}
- (retval_t) forward:(SEL)asel :(arglist_t)args;
@end
@interface Obj2 : Object
{
}
- hello:(const char *)str;
@end
static Obj1 *o1;
static Obj2 *o2;
@implementation Obj1
- (retval_t) forward:(SEL)sel :(arglist_t) args
{
[o2 performv:sel :args];
return self;
}
@end
@implementation Obj2
- hello:(const char *)str
{
printf("hello %s\n", str);
return self;
}
@end
int
main(void)
{
o1 = [[Obj1 alloc] init];
o2 = [[Obj2 alloc] init];
[o2 hello:"world"];
[(id) o1 hello:"world"];
return 0;
}
--
Summary: forward / performv broken
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libobjc
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gavin at ipalsoftware dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13834
More information about the Gcc-bugs
mailing list