Commit 333031f2 by Nicola Pero Committed by Nicola Pero

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
parent 24ee85f4
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;
......
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
......
/* 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment