http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47314

           Summary: Incorrect multiple selectors warning
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: objc
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: nic...@gcc.gnu.org


A trivial typo in objc-act.c means that the following testcase emits the wrong
warning when compiled with -Wselector:

/* Contributed by Nicola Pero <nicola.p...@meta-innovation.com>, January 2011. 
*/
/* { dg-options "-Wselector" } */
/* { dg-do compile } */

#include <objc/objc.h>

@interface MyObject
- (void) method;
@end

@interface MyObject2;
- (int) method;
@end

GCC 4.6.0 produces the warning

selector-warn-1.m:13:1: warning: multiple selectors named ‘+method’ found
[enabled by default]
selector-warn-1.m:8:1: note: found ‘-(void)method’
selector-warn-1.m:12:1: note: also found ‘-(int)method’

Note that the selector is wrongly referred to as '+method' instead of
'-method'.

Thanks

Reply via email to