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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [attributes/] [method-deprecated-2.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Contributed by Nicola Pero , October 2010.  */
2
/* { dg-do compile } */
3
 
4
#include 
5
 
6
@interface MyClass
7
{
8
  Class isa;
9
}
10
+ (int) deprecatedClassMethod: (id)firstObject, ...    __attribute__((sentinel)) __attribute__((deprecated));
11
- (int) deprecatedInstanceMethod: (id)firstobject, ... __attribute__((sentinel)) __attribute__((deprecated));
12
@end
13
 
14
/* Test that deprecation warnings are produced even if the method is
15
   also marked with another attribute too (this is to test the
16
   processing of multiple attributes).  */
17
void foo (void)
18
{
19
  MyClass *object = nil;
20
 
21
  [MyClass deprecatedClassMethod: object, nil];           /* { dg-warning "is deprecated" } */
22
  [object deprecatedInstanceMethod: object, nil];         /* { dg-warning "is deprecated" } */
23
}

powered by: WebSVN 2.1.0

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