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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [attributes/] [method-deprecated-3.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
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
2
/* { dg-do compile } */
3
 
4
#include <objc/objc.h>
5
 
6
/* Test that __attribute__ ((__deprecated__)) works as well as __attribute__ ((deprecated)).  */
7
@interface MyClass
8
{
9
  Class isa;
10
}
11
+ (int) deprecatedClassMethod: (id)firstObject, ...    __attribute__((__deprecated__));
12
- (int) deprecatedInstanceMethod: (id)firstobject, ... __attribute__((__deprecated__));
13
@end
14
 
15
void foo (void)
16
{
17
  MyClass *object = nil;
18
 
19
  [MyClass deprecatedClassMethod: object, nil];           /* { dg-warning "is deprecated" } */
20
  [object deprecatedInstanceMethod: object, nil];         /* { dg-warning "is deprecated" } */
21
}

powered by: WebSVN 2.1.0

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