This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/47314] New: Incorrect multiple selectors warning
- From: "nicola at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 16 Jan 2011 13:23:38 +0000
- Subject: [Bug objc/47314] New: Incorrect multiple selectors warning
- Auto-submitted: auto-generated
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