This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug objc/45878] [4.6 Regression] Can't compile even a trivial ObjC program with -fexceptions -O2


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]