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]

Objective-C compiler broken


Hi 

the objective-C compiler in the latest snapshot (and all previous
snapshots I know of) is broken (the runtime library is in great shape
instead). 

Basically, I can't compile any objective-C code.  Finding out why is
pretty difficult for me, anyway I spent a couple of hours to build a very
simple test case showing an example in which the latest snapshot fails
while stable releases of gcc do a fine job. 

In attach there is a couple of tests which gcc-2.95.2 compiles fine while
the gcc snapshot 20000911 fails to compile.  Basically they show that the
compiler can't compile methods returning `oneway void' any longer. 

Please would you add these two tests to the objc testsuite (and of course
fix them before next release). 

I'll try submitting more test cases if I can, thanks for the great work.
/*
 * Contributed by Nicola Pero <n.pero@mi.flashnet.it>
 * Tue Sep 19 4:29AM
 */

#include <objc/objc.h>
#include <objc/Protocol.h>

@protocol MyProtocol
- (oneway void) methodA;
@end

@interface MyObject <MyProtocol>
@end

@implementation MyObject
- (oneway void) methodA
{
}
@end

int main (void)
{
  MyObject *object = nil;

  [object methodA];

   exit (0);
}


/*
 * Contributed by Nicola Pero <n.pero@mi.flashnet.it>
 * Tue Sep 19 4:34AM
 */
#include <objc/objc.h>
#include <objc/Protocol.h>

@protocol MyProtocol
+ (oneway void) methodA;
@end

@interface MyObject <MyProtocol>
@end

@implementation MyObject
+ (oneway void) methodA
{
  printf ("methodA\n");
}
@end

int main (void)
{
  [MyObject methodA];

   exit (0);
}



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