OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [obj-c++.dg/] [class-protocol-1.mm] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
/* Check Class  types */
/* Check Class  types */
/* Author: David Ayers  */
/* Author: David Ayers  */
/* { dg-do compile } */
/* { dg-do compile } */
#include 
#include 
#include 
#include 
@protocol MyProto1
@protocol MyProto1
+(void)doItClass1;
+(void)doItClass1;
-(void)doItInstance1;
-(void)doItInstance1;
@end
@end
@protocol MyProto2
@protocol MyProto2
+(void)doItClass2;
+(void)doItClass2;
-(void)doItInstance2;
-(void)doItInstance2;
@end
@end
@interface MyClass1 
@interface MyClass1 
{
{
  Class isa;
  Class isa;
}
}
@end
@end
@implementation MyClass1
@implementation MyClass1
+(void)doItClass1{}
+(void)doItClass1{}
-(void)doItInstance1{}
-(void)doItInstance1{}
@end
@end
@interface MyClass2 : MyClass1 
@interface MyClass2 : MyClass1 
@end
@end
@implementation MyClass2
@implementation MyClass2
+(void)doItClass2{}
+(void)doItClass2{}
-(void)doItInstance2{}
-(void)doItInstance2{}
@end
@end
@interface MyClass3
@interface MyClass3
{
{
  Class isa;
  Class isa;
}
}
@end
@end
@interface MyClass4 : MyClass3 
@interface MyClass4 : MyClass3 
@end
@end
/*----------------------------------------*/
/*----------------------------------------*/
Class cls = 0;
Class cls = 0;
Class  clsP1 = 0;
Class  clsP1 = 0;
Class  clsP2 = 0;
Class  clsP2 = 0;
void
void
testSimple(void)
testSimple(void)
{
{
  [cls doItClass1];
  [cls doItClass1];
  [cls doItInstance1];
  [cls doItInstance1];
  [cls doItClass2];
  [cls doItClass2];
  [cls doItInstance2];
  [cls doItInstance2];
  [clsP1 doItClass1];
  [clsP1 doItClass1];
  [clsP1 doItInstance1]; /* { dg-warning "instead of" }  */
  [clsP1 doItInstance1]; /* { dg-warning "instead of" }  */
  [clsP1 doItClass2];    /* { dg-warning "not found in protocol" } */
  [clsP1 doItClass2];    /* { dg-warning "not found in protocol" } */
  [clsP1 doItInstance2]; /* { dg-warning "not found in protocol" } */
  [clsP1 doItInstance2]; /* { dg-warning "not found in protocol" } */
  [clsP2 doItClass1];    /* { dg-warning "not found in protocol" } */
  [clsP2 doItClass1];    /* { dg-warning "not found in protocol" } */
  [clsP2 doItInstance1]; /* { dg-warning "not found in protocol" } */
  [clsP2 doItInstance1]; /* { dg-warning "not found in protocol" } */
  [clsP2 doItClass2];
  [clsP2 doItClass2];
  [clsP2 doItInstance2]; /* { dg-warning "instead of" }  */
  [clsP2 doItInstance2]; /* { dg-warning "instead of" }  */
  [MyClass1 doItClass1];
  [MyClass1 doItClass1];
  [MyClass1 doItInstance1];
  [MyClass1 doItInstance1];
  [MyClass1 doItClass2];    /* { dg-warning "may not respond to" } */
  [MyClass1 doItClass2];    /* { dg-warning "may not respond to" } */
  [MyClass1 doItInstance2]; /* { dg-warning "may not respond to" } */
  [MyClass1 doItInstance2]; /* { dg-warning "may not respond to" } */
  [MyClass2 doItClass1];
  [MyClass2 doItClass1];
  [MyClass2 doItInstance1];
  [MyClass2 doItInstance1];
  [MyClass2 doItClass2];
  [MyClass2 doItClass2];
  [MyClass2 doItInstance2]; /* { dg-warning "may not respond to" } */
  [MyClass2 doItInstance2]; /* { dg-warning "may not respond to" } */
  [MyClass3 doItClass1];    /* { dg-warning "may not respond to" } */
  [MyClass3 doItClass1];    /* { dg-warning "may not respond to" } */
  [MyClass3 doItInstance1]; /* { dg-warning "may not respond to" } */
  [MyClass3 doItInstance1]; /* { dg-warning "may not respond to" } */
  [MyClass4 doItClass1];
  [MyClass4 doItClass1];
  [MyClass4 doItInstance1]; /* { dg-warning "may not respond to" } */
  [MyClass4 doItInstance1]; /* { dg-warning "may not respond to" } */
}
}
/*----------------------------------------*/
/*----------------------------------------*/
/* Protocols declared by categories */
/* Protocols declared by categories */
@protocol MyProto3
@protocol MyProto3
+(void)doItClass3;
+(void)doItClass3;
-(void)doItInstance3;
-(void)doItInstance3;
@end
@end
@protocol MyProto4
@protocol MyProto4
+(void)doItClass4;
+(void)doItClass4;
-(void)doItInstance4;
-(void)doItInstance4;
@end
@end
@interface MyClass1 (Category1) 
@interface MyClass1 (Category1) 
@end
@end
@interface MyClass2 (Category2) 
@interface MyClass2 (Category2) 
@end
@end
void
void
testCategory(void)
testCategory(void)
{
{
  [cls doItClass3];
  [cls doItClass3];
  [cls doItInstance3];
  [cls doItInstance3];
  [cls doItClass4];
  [cls doItClass4];
  [cls doItInstance4];
  [cls doItInstance4];
  [MyClass1 doItClass3];
  [MyClass1 doItClass3];
  [MyClass1 doItInstance3];
  [MyClass1 doItInstance3];
  [MyClass1 doItClass4];    /* { dg-warning "may not respond" } */
  [MyClass1 doItClass4];    /* { dg-warning "may not respond" } */
  [MyClass1 doItInstance4]; /* { dg-warning "may not respond" } */
  [MyClass1 doItInstance4]; /* { dg-warning "may not respond" } */
  [MyClass2 doItClass3];
  [MyClass2 doItClass3];
  [MyClass2 doItInstance3];
  [MyClass2 doItInstance3];
  [MyClass2 doItClass4];
  [MyClass2 doItClass4];
  [MyClass2 doItInstance4]; /* { dg-warning "may not respond" } */
  [MyClass2 doItInstance4]; /* { dg-warning "may not respond" } */
}
}
/*----------------------------------------*/
/*----------------------------------------*/
/* Inherited protocols declared by categories */
/* Inherited protocols declared by categories */
@protocol MyProto5 
@protocol MyProto5 
+(void)doItClass5;
+(void)doItClass5;
-(void)doItInstance5;
-(void)doItInstance5;
@end
@end
@protocol MyProto6 
@protocol MyProto6 
+(void)doItClass6;
+(void)doItClass6;
-(void)doItInstance6;
-(void)doItInstance6;
@end
@end
@interface MyClass1 (Category3) 
@interface MyClass1 (Category3) 
@end
@end
@interface MyClass2 (Category4) 
@interface MyClass2 (Category4) 
@end
@end
Class  clsP5 = 0;
Class  clsP5 = 0;
Class  clsP6 = 0;
Class  clsP6 = 0;
void
void
testCategoryInherited(void)
testCategoryInherited(void)
{
{
  [cls doItClass5];
  [cls doItClass5];
  [cls doItInstance5];
  [cls doItInstance5];
  [cls doItClass6];
  [cls doItClass6];
  [cls doItInstance6];
  [cls doItInstance6];
  [clsP5 doItClass1];
  [clsP5 doItClass1];
  [clsP5 doItInstance1]; /* { dg-warning "instead of" }  */
  [clsP5 doItInstance1]; /* { dg-warning "instead of" }  */
  [clsP5 doItClass2];    /* { dg-warning "not found in protocol" } */
  [clsP5 doItClass2];    /* { dg-warning "not found in protocol" } */
  [clsP5 doItInstance2]; /* { dg-warning "not found in protocol" } */
  [clsP5 doItInstance2]; /* { dg-warning "not found in protocol" } */
  [clsP6 doItClass1];    /* { dg-warning "not found in protocol" } */
  [clsP6 doItClass1];    /* { dg-warning "not found in protocol" } */
  [clsP6 doItInstance1]; /* { dg-warning "not found in protocol" } */
  [clsP6 doItInstance1]; /* { dg-warning "not found in protocol" } */
  [clsP6 doItClass2];
  [clsP6 doItClass2];
  [clsP6 doItInstance2]; /* { dg-warning "instead of" }  */
  [clsP6 doItInstance2]; /* { dg-warning "instead of" }  */
  [MyClass1 doItClass5];
  [MyClass1 doItClass5];
  [MyClass1 doItInstance5];
  [MyClass1 doItInstance5];
  [MyClass1 doItClass6];    /* { dg-warning "may not respond" } */
  [MyClass1 doItClass6];    /* { dg-warning "may not respond" } */
  [MyClass1 doItInstance6]; /* { dg-warning "may not respond" } */
  [MyClass1 doItInstance6]; /* { dg-warning "may not respond" } */
  [MyClass2 doItClass5];
  [MyClass2 doItClass5];
  [MyClass2 doItInstance5];
  [MyClass2 doItInstance5];
  [MyClass2 doItClass6];
  [MyClass2 doItClass6];
  [MyClass2 doItInstance6]; /* { dg-warning "may not respond" } */
  [MyClass2 doItInstance6]; /* { dg-warning "may not respond" } */
}
}
/*----------------------------------------*/
/*----------------------------------------*/
/* Forward declared root protocols */
/* Forward declared root protocols */
@protocol FwProto;
@protocol FwProto;
@interface MyClass1 (Forward) 
@interface MyClass1 (Forward) 
@end
@end
Class  clsP7 = 0;
Class  clsP7 = 0;
void
void
testForwardeDeclared1(void)
testForwardeDeclared1(void)
{
{
  [cls doItClass7];         /* { dg-warning "no .\\+doItClass7. method found" } */
  [cls doItClass7];         /* { dg-warning "no .\\+doItClass7. method found" } */
  [cls doItInstance7];      /* { dg-warning "no .\\+doItInstance7. method found" } */
  [cls doItInstance7];      /* { dg-warning "no .\\+doItInstance7. method found" } */
  [clsP7 doItClass7];       /* { dg-warning "not found in protocol" } */
  [clsP7 doItClass7];       /* { dg-warning "not found in protocol" } */
  /* { dg-warning "no .\\+doItClass7. method found" "" { target *-*-* } 190 } */
  /* { dg-warning "no .\\+doItClass7. method found" "" { target *-*-* } 190 } */
  [clsP7 doItInstance7];    /* { dg-warning "not found in protocol" } */
  [clsP7 doItInstance7];    /* { dg-warning "not found in protocol" } */
  /* { dg-warning "no .\\+doItInstance7. method found" "" { target *-*-* } 192 } */
  /* { dg-warning "no .\\+doItInstance7. method found" "" { target *-*-* } 192 } */
  [MyClass1 doItClass7];    /* { dg-warning "may not respond" } */
  [MyClass1 doItClass7];    /* { dg-warning "may not respond" } */
  [MyClass1 doItInstance7]; /* { dg-warning "may not respond" } */
  [MyClass1 doItInstance7]; /* { dg-warning "may not respond" } */
  [MyClass2 doItClass7];    /* { dg-warning "may not respond" } */
  [MyClass2 doItClass7];    /* { dg-warning "may not respond" } */
  [MyClass2 doItInstance7]; /* { dg-warning "may not respond" } */
  [MyClass2 doItInstance7]; /* { dg-warning "may not respond" } */
}
}
@protocol FwProto
@protocol FwProto
+(void)doItClass7;
+(void)doItClass7;
-(void)doItInstance7;
-(void)doItInstance7;
@end
@end
void
void
testForwardeDeclared2(void)
testForwardeDeclared2(void)
{
{
  [cls doItClass7];
  [cls doItClass7];
  [cls doItInstance7];
  [cls doItInstance7];
  [clsP7 doItClass7];
  [clsP7 doItClass7];
  [clsP7 doItInstance7]; /* { dg-warning "instead of" }  */
  [clsP7 doItInstance7]; /* { dg-warning "instead of" }  */
  [MyClass1 doItClass7];
  [MyClass1 doItClass7];
  [MyClass1 doItInstance7];
  [MyClass1 doItInstance7];
  [MyClass2 doItClass7];
  [MyClass2 doItClass7];
  [MyClass2 doItInstance7];
  [MyClass2 doItInstance7];
}
}
/*----------------------------------------*/
/*----------------------------------------*/
/* Inherited non root protocols */
/* Inherited non root protocols */
@protocol MyProto8
@protocol MyProto8
+(void)doItClass8;
+(void)doItClass8;
-(void)doItInstance8;
-(void)doItInstance8;
@end
@end
@protocol MyProto9 
@protocol MyProto9 
+(void)doItClass9;
+(void)doItClass9;
-(void)doItInstance9;
-(void)doItInstance9;
@end
@end
@interface MyClass1 (InheritedNonRoot) 
@interface MyClass1 (InheritedNonRoot) 
@end
@end
Class  clsP8 = 0;
Class  clsP8 = 0;
Class  clsP9 = 0;
Class  clsP9 = 0;
void
void
testInheritedNonRoot(void)
testInheritedNonRoot(void)
{
{
  [cls doItClass8];
  [cls doItClass8];
  [cls doItInstance8];
  [cls doItInstance8];
  [cls doItClass9];
  [cls doItClass9];
  [cls doItInstance9];
  [cls doItInstance9];
  [clsP8 doItClass8];
  [clsP8 doItClass8];
  [clsP8 doItInstance8]; /* { dg-warning "instead of" }  */
  [clsP8 doItInstance8]; /* { dg-warning "instead of" }  */
  [clsP8 doItClass9];    /* { dg-warning "not found in protocol" } */
  [clsP8 doItClass9];    /* { dg-warning "not found in protocol" } */
  [clsP8 doItInstance9]; /* { dg-warning "not found in protocol" } */
  [clsP8 doItInstance9]; /* { dg-warning "not found in protocol" } */
  [clsP9 doItClass8];
  [clsP9 doItClass8];
  [clsP9 doItInstance8]; /* { dg-warning "instead of" }  */
  [clsP9 doItInstance8]; /* { dg-warning "instead of" }  */
  [clsP9 doItClass9];
  [clsP9 doItClass9];
  [clsP9 doItInstance9]; /* { dg-warning "instead of" }  */
  [clsP9 doItInstance9]; /* { dg-warning "instead of" }  */
  [MyClass1 doItClass8];
  [MyClass1 doItClass8];
  [MyClass1 doItInstance8];
  [MyClass1 doItInstance8];
  [MyClass1 doItClass9];
  [MyClass1 doItClass9];
  [MyClass1 doItInstance9];
  [MyClass1 doItInstance9];
  [MyClass2 doItClass8];
  [MyClass2 doItClass8];
  [MyClass2 doItInstance8];
  [MyClass2 doItInstance8];
  [MyClass2 doItClass9];
  [MyClass2 doItClass9];
  [MyClass2 doItInstance9];
  [MyClass2 doItInstance9];
}
}
/*----------------------------------------*/
/*----------------------------------------*/
/* Prototype mismatch  */
/* Prototype mismatch  */
@protocol MyOtherProto1
@protocol MyOtherProto1
+(id)doItClass1;
+(id)doItClass1;
-(id)doItInstance1;
-(id)doItInstance1;
@end
@end
@interface MyOtherClass1 
@interface MyOtherClass1 
@end
@end
Class  oclsP1;
Class  oclsP1;
void
void
testPrototypeMismatch(void)
testPrototypeMismatch(void)
{
{
  id tmp1 = [oclsP1 doItClass1];
  id tmp1 = [oclsP1 doItClass1];
  id tmp2 = [oclsP1 doItInstance1]; /* { dg-warning "instead of" }  */
  id tmp2 = [oclsP1 doItInstance1]; /* { dg-warning "instead of" }  */
  [clsP1 doItClass1];
  [clsP1 doItClass1];
  [clsP1 doItInstance1]; /* { dg-warning "instead of" }  */
  [clsP1 doItInstance1]; /* { dg-warning "instead of" }  */
}
}
id obj = nil;
id obj = nil;
id  objP1 = nil;
id  objP1 = nil;
id  objP2 = nil;
id  objP2 = nil;
id  objP5 = nil;
id  objP5 = nil;
int num = 0;
int num = 0;
void *ptr = 0;
void *ptr = 0;
MyClass1 *mc1 = nil;
MyClass1 *mc1 = nil;
void
void
testComptypes(void)
testComptypes(void)
{
{
  { /* id , id   */
  { /* id , id   */
    objP1 == objP2;  /* { dg-warning "lacks a cast" } */
    objP1 == objP2;  /* { dg-warning "lacks a cast" } */
    objP2 == objP1;  /* { dg-warning "lacks a cast" } */
    objP2 == objP1;  /* { dg-warning "lacks a cast" } */
    objP1 == objP5;
    objP1 == objP5;
    objP5 == objP1;
    objP5 == objP1;
  }
  }
  { /* id , SomeClass *  */
  { /* id , SomeClass *  */
    mc1 == objP1;
    mc1 == objP1;
    objP1 == mc1;
    objP1 == mc1;
    mc1 == objP2; /* { dg-warning "lacks a cast" } */
    mc1 == objP2; /* { dg-warning "lacks a cast" } */
    objP2 == mc1; /* { dg-warning "lacks a cast" } */
    objP2 == mc1; /* { dg-warning "lacks a cast" } */
  }
  }
  { /* id , id  */
  { /* id , id  */
    obj == objP1;
    obj == objP1;
    objP1 == obj;
    objP1 == obj;
  }
  }
  { /* id , Class  */
  { /* id , Class  */
    cls == objP1; /* { dg-warning "lacks a cast" } */
    cls == objP1; /* { dg-warning "lacks a cast" } */
    objP1 == cls; /* { dg-warning "lacks a cast" } */
    objP1 == cls; /* { dg-warning "lacks a cast" } */
  }
  }
  { /* id , non-ObjC  */
  { /* id , non-ObjC  */
    num == objP1; /* { dg-warning "between pointer" } */
    num == objP1; /* { dg-warning "between pointer" } */
    objP1 == num; /* { dg-warning "between pointer" } */
    objP1 == num; /* { dg-warning "between pointer" } */
    ptr == objP1;
    ptr == objP1;
    objP1 == ptr;
    objP1 == ptr;
  }
  }
  { /* Class , Class  */
  { /* Class , Class  */
    clsP1 == clsP2; /* { dg-warning "lacks a cast" } */
    clsP1 == clsP2; /* { dg-warning "lacks a cast" } */
    clsP2 == clsP1; /* { dg-warning "lacks a cast" } */
    clsP2 == clsP1; /* { dg-warning "lacks a cast" } */
    clsP1 == clsP5;
    clsP1 == clsP5;
    clsP5 == clsP1;
    clsP5 == clsP1;
  }
  }
  { /* Class , SomeClass * */
  { /* Class , SomeClass * */
    mc1 == clsP1; /* { dg-warning "lacks a cast" } */
    mc1 == clsP1; /* { dg-warning "lacks a cast" } */
    clsP1 == mc1; /* { dg-warning "lacks a cast" } */
    clsP1 == mc1; /* { dg-warning "lacks a cast" } */
  }
  }
  { /* Class , id */
  { /* Class , id */
    obj == clsP1;
    obj == clsP1;
    clsP1 == obj;
    clsP1 == obj;
  }
  }
  { /* Class , Class */
  { /* Class , Class */
    cls == clsP1;
    cls == clsP1;
    clsP1 == cls;
    clsP1 == cls;
  }
  }
  { /* Class , non-ObjC */
  { /* Class , non-ObjC */
    num == clsP1; /* { dg-warning "between pointer" } */
    num == clsP1; /* { dg-warning "between pointer" } */
    clsP1 == num; /* { dg-warning "between pointer" } */
    clsP1 == num; /* { dg-warning "between pointer" } */
    ptr == clsP1;
    ptr == clsP1;
    clsP1 == ptr;
    clsP1 == ptr;
  }
  }
  { /* Class , id  */
  { /* Class , id  */
    clsP1 == objP1; /* { dg-warning "lacks a cast" } */
    clsP1 == objP1; /* { dg-warning "lacks a cast" } */
    objP1 == clsP1; /* { dg-warning "lacks a cast" } */
    objP1 == clsP1; /* { dg-warning "lacks a cast" } */
  }
  }
  { /* id , id   */
  { /* id , id   */
    objP1 = objP2; /* { dg-warning "does not conform" } */
    objP1 = objP2; /* { dg-warning "does not conform" } */
    objP2 = objP1; /* { dg-warning "does not conform" } */
    objP2 = objP1; /* { dg-warning "does not conform" } */
    objP1 = objP5;
    objP1 = objP5;
    objP5 = objP1; /* { dg-warning "does not conform" } */
    objP5 = objP1; /* { dg-warning "does not conform" } */
  }
  }
  { /* id , SomeClass *  */
  { /* id , SomeClass *  */
    mc1 = objP1;
    mc1 = objP1;
    objP1 = mc1;
    objP1 = mc1;
    mc1 = objP2; /* { dg-warning "does not conform" } */
    mc1 = objP2; /* { dg-warning "does not conform" } */
    objP2 = mc1; /* { dg-warning "does not implement" } */
    objP2 = mc1; /* { dg-warning "does not implement" } */
  }
  }
  { /* id , id  */
  { /* id , id  */
    obj = objP1;
    obj = objP1;
    objP1 = obj;
    objP1 = obj;
  }
  }
  { /* id , Class  */
  { /* id , Class  */
    cls = objP1; /* { dg-warning "distinct Objective\\-C type" } */
    cls = objP1; /* { dg-warning "distinct Objective\\-C type" } */
    objP1 = cls; /* { dg-warning "distinct Objective\\-C type" } */
    objP1 = cls; /* { dg-warning "distinct Objective\\-C type" } */
  }
  }
  { /* id , non-ObjC  */
  { /* id , non-ObjC  */
    num = objP1; /* { dg-error "invalid conversion" } */
    num = objP1; /* { dg-error "invalid conversion" } */
    objP1 = num; /* { dg-error "invalid conversion" } */
    objP1 = num; /* { dg-error "invalid conversion" } */
    ptr = objP1;
    ptr = objP1;
    objP1 = ptr; /* { dg-error "invalid conversion" } */
    objP1 = ptr; /* { dg-error "invalid conversion" } */
  }
  }
  { /* Class , Class  */
  { /* Class , Class  */
    clsP1 = clsP2; /* { dg-warning "does not conform" } */
    clsP1 = clsP2; /* { dg-warning "does not conform" } */
    clsP2 = clsP1; /* { dg-warning "does not conform" } */
    clsP2 = clsP1; /* { dg-warning "does not conform" } */
    clsP1 = clsP5;
    clsP1 = clsP5;
    clsP5 = clsP1; /* { dg-warning "does not conform" } */
    clsP5 = clsP1; /* { dg-warning "does not conform" } */
  }
  }
  { /* Class , SomeClass * */
  { /* Class , SomeClass * */
    /* These combinations should always elicit a warning.  */
    /* These combinations should always elicit a warning.  */
    mc1 = clsP1; /* { dg-warning "distinct Objective\\-C type" } */
    mc1 = clsP1; /* { dg-warning "distinct Objective\\-C type" } */
    clsP1 = mc1; /* { dg-warning "distinct Objective\\-C type" } */
    clsP1 = mc1; /* { dg-warning "distinct Objective\\-C type" } */
    mc1 = clsP2; /* { dg-warning "distinct Objective\\-C type" } */
    mc1 = clsP2; /* { dg-warning "distinct Objective\\-C type" } */
    clsP2 = mc1; /* { dg-warning "distinct Objective\\-C type" } */
    clsP2 = mc1; /* { dg-warning "distinct Objective\\-C type" } */
  }
  }
  { /* Class , id */
  { /* Class , id */
    obj = clsP1;
    obj = clsP1;
    clsP1 = obj;
    clsP1 = obj;
  }
  }
  { /* Class , Class */
  { /* Class , Class */
    cls = clsP1;
    cls = clsP1;
    clsP1 = cls;
    clsP1 = cls;
  }
  }
  { /* Class , non-ObjC */
  { /* Class , non-ObjC */
    num = clsP1; /* { dg-error "invalid conversion" } */
    num = clsP1; /* { dg-error "invalid conversion" } */
    clsP1 = num; /* { dg-error "invalid conversion" } */
    clsP1 = num; /* { dg-error "invalid conversion" } */
    ptr = clsP1;
    ptr = clsP1;
    clsP1 = ptr; /* { dg-error "invalid conversion" } */
    clsP1 = ptr; /* { dg-error "invalid conversion" } */
  }
  }
  { /* Class , id  */
  { /* Class , id  */
    clsP1 = objP1; /* { dg-warning "distinct Objective\\-C type" } */
    clsP1 = objP1; /* { dg-warning "distinct Objective\\-C type" } */
    objP1 = clsP1; /* { dg-warning "distinct Objective\\-C type" } */
    objP1 = clsP1; /* { dg-warning "distinct Objective\\-C type" } */
  }
  }
}
}
int main ()
int main ()
{
{
  testSimple();
  testSimple();
  testCategory();
  testCategory();
  testCategoryInherited();
  testCategoryInherited();
  return(0);
  return(0);
}
}
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.