mirror of git://gcc.gnu.org/git/gcc.git
In gcc/testsuite/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/testsuite/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47073 * objc.dg/incomplete-type-1.m: New test. In gcc/objc/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47073 * objc-act.c (encode_method_prototype): Fixed both location and format string of error "type %qT does not have a known size". From-SVN: r168285
This commit is contained in:
parent
24ee85f452
commit
333031f2d3
|
|
@ -1,3 +1,9 @@
|
|||
2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
PR objc/47073
|
||||
* objc-act.c (encode_method_prototype): Fixed both location and
|
||||
format string of error "type %qT does not have a known size".
|
||||
|
||||
2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* config-lang.in (gtfiles): Added c-family/c-cppbuiltin.c.
|
||||
|
|
|
|||
|
|
@ -5965,8 +5965,9 @@ encode_method_prototype (tree method_decl)
|
|||
/* If a type size is not known, bail out. */
|
||||
if (sz < 0)
|
||||
{
|
||||
error ("type %q+D does not have a known size",
|
||||
type);
|
||||
error_at (DECL_SOURCE_LOCATION (method_decl),
|
||||
"type %qT does not have a known size",
|
||||
type);
|
||||
/* Pretend that the encoding succeeded; the compilation will
|
||||
fail nevertheless. */
|
||||
goto finish_encoding;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
PR objc/47073
|
||||
* objc.dg/incomplete-type-1.m: New test.
|
||||
|
||||
2010-12-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/46626
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */
|
||||
/* { dg-do compile } */
|
||||
|
||||
#include <objc/objc.h>
|
||||
|
||||
enum type1;
|
||||
struct type2;
|
||||
|
||||
@interface MyObject
|
||||
- (void) method1: (enum type1)argument;
|
||||
- (void) method2: (struct type2)argument;
|
||||
@end
|
||||
|
||||
@implementation MyObject
|
||||
- (void) method1: (enum type1)argument { /* { dg-error "does not have a known size" } */
|
||||
return;
|
||||
}
|
||||
- (void) method2: (struct type2)argument { /* { dg-error "does not have a known size" } */
|
||||
return;
|
||||
}
|
||||
@end
|
||||
|
||||
Loading…
Reference in New Issue