summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/selector-warn-1.m
blob: b4b308d7b70886e199627c7234b55d4f41c4733e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, January 2011.  */
/* { dg-options "-Wselector" } */
/* { dg-do compile } */

#include <objc/objc.h>

@interface RootObject
@end

@interface MyObject : RootObject
- (void) method; /* { dg-message "found" } */
@end

@interface MyObject2  : RootObject
- (int) method; /* { dg-message "also found" } */
@end /* { dg-warning "multiple selectors named .-method. found" } */