summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg
diff options
context:
space:
mode:
authorzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-26 00:01:02 +0000
committerzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-26 00:01:02 +0000
commitbe30409ff6dee1062ad752c1a483728160e74d1f (patch)
tree38fca6229a92275afab2ea69a258ab62c410b3c9 /gcc/testsuite/obj-c++.dg
parente63e38415ac72e2078c7ecfbde849b56e285665f (diff)
downloadgcc-be30409ff6dee1062ad752c1a483728160e74d1f.tar.gz
[gcc/testsuite/ChangeLog]
2005-05-25 Ziemowit Laski <zlaski@apple.com> * obj-c++.dg/selector-3.mm: New. * objc.dg/selector-3.m: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100175 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/obj-c++.dg')
-rw-r--r--gcc/testsuite/obj-c++.dg/selector-3.mm26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/obj-c++.dg/selector-3.mm b/gcc/testsuite/obj-c++.dg/selector-3.mm
new file mode 100644
index 00000000000..49f7e417208
--- /dev/null
+++ b/gcc/testsuite/obj-c++.dg/selector-3.mm
@@ -0,0 +1,26 @@
+/* Test warning for non-existent selectors. */
+/* This is the "-fgnu-runtime" variant of objc.dg/selector-1.m. */
+/* { dg-options "-Wselector -fgnu-runtime" } */
+/* { dg-do compile } */
+
+typedef struct objc_object { struct objc_class *class_pointer; } *id;
+typedef const struct objc_selector *SEL;
+
+@interface Foo
+- (void) foo;
+- (void) bar;
+@end
+
+@implementation Foo
+- (void) bar
+{
+}
+
+- (void) foo
+{
+ SEL a,b,c;
+ a = @selector(b1ar);
+ b = @selector(bar);
+}
+@end /* { dg-warning "creating selector for nonexistent method .b1ar." } */
+