annotate gcc/testsuite/objc.dg/method-5.m @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Check if sending messages to "underspecified" objects is handled gracefully. */
kono
parents:
diff changeset
2 /* Author: Ziemowit Laski <zlaski@apple.com>. */
kono
parents:
diff changeset
3 /* { dg-do compile } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 @class UnderSpecified;
kono
parents:
diff changeset
6 typedef struct NotAClass {
kono
parents:
diff changeset
7 int a, b;
kono
parents:
diff changeset
8 } NotAClass;
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 void foo(UnderSpecified *u, NotAClass *n) {
kono
parents:
diff changeset
11 [n nonexistent_method]; /* { dg-warning "invalid receiver type" } */
kono
parents:
diff changeset
12 /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
kono
parents:
diff changeset
13 [NotAClass nonexistent_method]; /* { dg-error ".NotAClass. is not an Objective\\-C class name or alias" } */
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
14 [u nonexistent_method]; /* { dg-warning "'.interface' of class .UnderSpecified. not found" } */
111
kono
parents:
diff changeset
15 /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
16 [UnderSpecified nonexistent_method]; /* { dg-warning "'.interface' of class .UnderSpecified. not found" } */
111
kono
parents:
diff changeset
17 /* { dg-warning "no .\\+nonexistent_method. method found" "" { target *-*-* } .-1 } */
kono
parents:
diff changeset
18 }
kono
parents:
diff changeset
19
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
20 /* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */