objc runtime: -[Object error:]
Ronald Pijnacker
Ronald.Pijnacker@best.ms.philips.com
Fri Feb 13 05:44:00 GMT 1998
Hello,
Imho the method -[Object error:] contains a small bug. When it is
called the output is as follows:
error: A (instance)
does not recognize %s does not recognize %s
on the following test program:
-----
#include <objc/Object.h>
@interface A : Object
- a;
@end
@interface B : Object
- b;
@end
@implementation A
- a { return self; }
@end
@implementation B
- b { return self; }
@end
int
main(void)
{
id a = [A new];
[a b];
return 0;
}
-----
The problem is probably that in -[Object error:] va_start is
used. Then objc_error is called, which also used va_start. I believe
that calling objc_verror instead of objc_error will solve the problem.
Thanks,
Ronald Pijnacker
rhp@iname.com
More information about the Gcc-bugs
mailing list