OSDN Git Service

* obj-c++.dg/selector-1.mm: Move to...
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 May 2005 01:08:04 +0000 (01:08 +0000)
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 May 2005 01:08:04 +0000 (01:08 +0000)
        * obj-c++.dg/selector-4.mm: here...

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100180 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/selector-4.mm [new file with mode: 0644]

index 36234bb..96b66f5 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-25  Mike Stump  <mrs@apple.com>
+
+       * obj-c++.dg/selector-1.mm: Move to...
+       * obj-c++.dg/selector-4.mm: here...
+
 2005-05-25  Ziemowit Laski  <zlaski@apple.com>
 
        * obj-c++.dg/selector-1.mm: New.
 2005-05-25  Ziemowit Laski  <zlaski@apple.com>
 
        * obj-c++.dg/selector-1.mm: New.
diff --git a/gcc/testsuite/obj-c++.dg/selector-4.mm b/gcc/testsuite/obj-c++.dg/selector-4.mm
new file mode 100644 (file)
index 0000000..b9cc5e0
--- /dev/null
@@ -0,0 +1,26 @@
+/* Test warning for non existing selectors.  */
+/* Contributed by Devang Patel <dpatel@apple.com>.  */
+/* { dg-options "-Wselector -fnext-runtime" } */
+/* { dg-do compile } */
+
+typedef struct objc_object { struct objc_class *class_pointer; } *id;
+typedef struct objc_selector    *SEL;
+
+@interface Foo
+- (void) foo;
+- (void) bar;
+@end
+
+@implementation Foo
+- (void) bar
+{
+}
+
+- (void) foo
+{
+  SEL a,b,c;
+  a = @selector(b1ar); /* { dg-warning "creating selector for nonexistent method .b1ar." } */
+  b = @selector(bar);
+}
+@end
+