In gcc/objc/: 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com>

In gcc/objc/:
2011-01-17  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47314
	* objc-act.c (finish_objc): When calling check_duplicates to check
	duplicated instance methods, set 'is_class' to 0, not 1.

In gcc/testsuite/:
2011-01-17  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47314
	* objc.dg/selector-warn-1.m: New.
	* obj-c++.dg/selector-warn-1.mm: New.

From-SVN: r168934
This commit is contained in:
Nicola Pero 2011-01-17 22:17:47 +00:00 committed by Nicola Pero
parent 015a793772
commit f0fc7be525
5 changed files with 45 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47314
* objc-act.c (finish_objc): When calling check_duplicates to check
duplicated instance methods, set 'is_class' to 0, not 1.
2011-01-14 Ben Elliston <bje@au.ibm.com>
PR 19162

View File

@ -12986,7 +12986,7 @@ finish_objc (void)
for (hsh = cls_method_hash_list[slot]; hsh; hsh = hsh->next)
check_duplicates (hsh, 0, 1);
for (hsh = nst_method_hash_list[slot]; hsh; hsh = hsh->next)
check_duplicates (hsh, 0, 1);
check_duplicates (hsh, 0, 0);
}
}

View File

@ -1,3 +1,9 @@
2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47314
* objc.dg/selector-warn-1.m: New.
* obj-c++.dg/selector-warn-1.mm: New.
2011-01-17 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.dg/tree-ssa/vrp51.c: Prefix each "bug." string with "vrp.".

View File

@ -0,0 +1,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" } */

View File

@ -0,0 +1,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" } */