OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [fsf-package-0.m] - Rev 801

Go to most recent revision | Compare with Previous | Blame | View Log

/* { dg-do compile } */
 
#import "../objc-obj-c++-shared/TestsuiteObject.h"
 
@interface obj : TestsuiteObject
{
@public
  int v1;
@package	/* { dg-warning ".@package. presently has the same effect as .@public." } */
  int v2;
@protected
  int v3;
@private
  int v4;
}
- (int) value;
- (void) setValue: (int)number;
@end
 
@implementation obj : TestsuiteObject
 
- (int) value { return v1; }
- (void) setValue: (int)number { v1 = number; }
 
@end
 
void foo (void)
{
  obj *a;
 
  [a setValue:2];
  a->v2 = 1;
  a->v3 = [a value] - a->v2;	/* { dg-warning ".v3. is @protected" } */
  a->v4 = a->v3 - 1;		/* { dg-warning ".v4. is @private" } */
  				/* { dg-warning ".v3. is @protected" "" { target *-*-* } 34 } */
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.