newproperty-nowarn-compound-exp.m   [plain text]


/* APPLE LOCAL file radar 4805321 */
/* Test that no bogus warning is issued in the synthesize compound-expression. */
/* { dg-options "-fobjc-new-property -mmacosx-version-min=10.5 -Wall" { target powerpc*-*-darwin* i?86*-*-darwin* } } */
/* { dg-options "-fobjc-new-property -Wall" { target arm*-*-darwin* } } */
/* { dg-do compile { target *-*-darwin* } } */

@interface test
{
  int i;
}
@property (assign) int foo;
@property (assign) int foo1;
@property (assign) int foo2;
@end
extern int one ();
extern int two ();

@implementation test
@synthesize foo=i,foo1=i,foo2=i;
- (void) pickWithWarning:(int)which { 
	   self.foo = (which ? 1 : 2); 
	   self.foo1 = self.foo2 = (which ? 1 : 2); 
	   self.foo = (which ? one() : two() ); 
	   self.foo1 = self.foo2 = (which ? one() : two ()); 
}
@end