This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/45878] [4.6 Regression] Can't compile even a trivial ObjC program with -fexceptions -O2
- From: "nicola at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Oct 2010 18:47:54 +0000
- Subject: [Bug objc/45878] [4.6 Regression] Can't compile even a trivial ObjC program with -fexceptions -O2
- Auto-submitted: auto-generated
- References: <bug-45878-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45878
--- Comment #15 from Nicola Pero <nicola at gcc dot gnu.org> 2010-10-13 18:47:52 UTC ---
Try the following testcase, which requires no includes:
==============
typedef struct objc_object { Class class_pointer; } *id;
typedef unsigned char BOOL;
@interface Object
{
Class isa;
}
- (BOOL)isEqual:anObject;
@end
@interface NXConstantString: Object
{
char *c_string;
unsigned int len;
}
@end
void function (void)
{
if ([@"strings" isEqual: (id)0])
{
;
}
}
===============
Compile it with
gcc test.m -c -O2 -fexceptions
Thanks