public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/47314] New: Incorrect multiple selectors warning
@ 2011-01-16 13:49 nicola at gcc dot gnu.org
  2011-01-16 14:04 ` [Bug objc/47314] " nicola at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: nicola at gcc dot gnu.org @ 2011-01-16 13:49 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-19  2:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-16 13:49 [Bug objc/47314] New: Incorrect multiple selectors warning nicola at gcc dot gnu.org
2011-01-16 14:04 ` [Bug objc/47314] " nicola at gcc dot gnu.org
2011-01-17 22:49 ` nicola at gcc dot gnu.org
2011-01-19  6:31 ` nicola at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).