This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug objc/47314] New: Incorrect multiple selectors warning


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: unassigned@gcc.gnu.org
        ReportedBy: nicola@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.pero@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]