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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [attributes/] [categ-attribute-2.m] - Blame information for rev 801

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

Line No. Rev Author Line
1 704 jeremybenn
/* { dg-do compile } */
2
 
3
#include <objc/objc.h>
4
#include "../../objc-obj-c++-shared/TestsuiteObject.h"
5
 
6
@interface obj : TestsuiteObject {
7
@public
8
  int var;
9
}
10
- (int) mth;
11
@end
12
 
13
@implementation obj
14
- (int) mth {  return var; }
15
@end
16
 
17
__attribute__ ((deprecated("no dep_categ")))
18
@interface obj (dep_categ)
19
- (int) depmth;/* { dg-warning "category attributes are not available in this version" } */
20
@end
21
 
22
__attribute__ ((deprecated))
23
@implementation obj (dep_categ) /* { dg-warning "prefix attributes are ignored for implementations" } */
24
- (int) depmth { return var + 1; }
25
@end
26
 
27
int foo (void)
28
{
29
    obj *p = [obj new];
30
    int q = [p depmth];
31
    return [p mth];
32
}

powered by: WebSVN 2.1.0

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