aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/class-protocol-1.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/class-protocol-1.m')
-rw-r--r--gcc/testsuite/objc.dg/class-protocol-1.m36
1 files changed, 23 insertions, 13 deletions
diff --git a/gcc/testsuite/objc.dg/class-protocol-1.m b/gcc/testsuite/objc.dg/class-protocol-1.m
index ffa2435f5c0..7eb55024c48 100644
--- a/gcc/testsuite/objc.dg/class-protocol-1.m
+++ b/gcc/testsuite/objc.dg/class-protocol-1.m
@@ -313,9 +313,11 @@ testComptypes(void)
{ /* id <protocol>, SomeClass * */
mc1 == objP1;
objP1 == mc1;
-
- mc1 == objP2; /* { dg-warning "does not implement" } */
- objP2 == mc1; /* { dg-warning "does not implement" } */
+
+ /* APPLE LOCAL begin mainline */
+ mc1 == objP2; /* { dg-warning "lacks a cast" } */
+ objP2 == mc1; /* { dg-warning "lacks a cast" } */
+ /* APPLE LOCAL end mainline */
}
{ /* id <protocol>, id */
obj == objP1;
@@ -371,10 +373,12 @@ testComptypes(void)
objP5 = objP1; /* { dg-warning "does not conform" } */
}
{ /* id <protocol>, SomeClass * */
- mc1 = objP1; /* { dg-warning "incompatible" } */ /* FIXME: should be "" */
+ /* APPLE LOCAL mainline */
+ mc1 = objP1;
objP1 = mc1;
- mc1 = objP2; /* { dg-warning "incompatible" } */ /* FIXME: should be "does not implement" */
+ /* APPLE LOCAL mainline */
+ mc1 = objP2; /* { dg-warning "does not conform" } */
objP2 = mc1; /* { dg-warning "does not implement" } */
}
{ /* id <protocol>, id */
@@ -382,8 +386,10 @@ testComptypes(void)
objP1 = obj;
}
{ /* id <protocol>, Class */
- cls = objP1; /* { dg-warning "incompatible" } */
- objP1 = cls; /* { dg-warning "incompatible" } */
+ /* APPLE LOCAL begin mainline */
+ cls = objP1; /* { dg-warning "distinct Objective\\-C type" } */
+ objP1 = cls; /* { dg-warning "distinct Objective\\-C type" } */
+ /* APPLE LOCAL end mainline */
}
{ /* id <protocol>, non-ObjC */
num = objP1; /* { dg-warning "makes integer" } */
@@ -401,11 +407,13 @@ testComptypes(void)
}
{ /* Class <protocol>, SomeClass * */
/* These combinations should always elicit a warning. */
- mc1 = clsP1; /* { dg-warning "incompatible" } */
- clsP1 = mc1; /* { dg-warning "incompatible" } */
+ /* APPLE LOCAL begin mainline */
+ mc1 = clsP1; /* { dg-warning "distinct Objective\\-C type" } */
+ clsP1 = mc1; /* { dg-warning "distinct Objective\\-C type" } */
- mc1 = clsP2; /* { dg-warning "incompatible" } */
- clsP2 = mc1; /* { dg-warning "incompatible" } */
+ mc1 = clsP2; /* { dg-warning "distinct Objective\\-C type" } */
+ clsP2 = mc1; /* { dg-warning "distinct Objective\\-C type" } */
+ /* APPLE LOCAL end mainline */
}
{ /* Class <protocol>, id */
obj = clsP1;
@@ -423,8 +431,10 @@ testComptypes(void)
clsP1 = ptr;
}
{ /* Class <protocol>, id <protocol> */
- clsP1 = objP1; /* { dg-warning "incompatible" } */
- objP1 = clsP1; /* { dg-warning "incompatible" } */
+ /* APPLE LOCAL begin mainline */
+ clsP1 = objP1; /* { dg-warning "distinct Objective\\-C type" } */
+ objP1 = clsP1; /* { dg-warning "distinct Objective\\-C type" } */
+ /* APPLE LOCAL end mainline */
}
}