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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [attributes/] [proto-attribute-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 , November 2010.  */
2
/* { dg-do compile } */
3
/* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
4
 
5
/* Test deprecate attribute with a forward declarations of
6
   @protocol.  */
7
 
8
#include 
9
#include 
10
#include 
11
 
12
__attribute__ ((deprecated))
13
@protocol DeprecatedProtocol1;
14
 
15
@protocol NonDeprecatedProtocol1;
16
 
17
void function1 (id  object); /* { dg-warning "is deprecated" } */
18
void function2 (id  object);
19
 
20
@class Class4;
21
 
22
void function3 (Class4  *object); /* { dg-warning "is deprecated" } */
23
void function4 (Class4  *object);
24
void function5 (Class4  *object); /* { dg-warning "is deprecated" } */
25
 
26
int function6 (void)
27
{
28
  Protocol *p1 = @protocol (DeprecatedProtocol1); /* { dg-warning "is deprecated" } */
29
  Protocol *p2 = @protocol (NonDeprecatedProtocol1);
30
 
31
  return (p1 == p2);
32
}
33
 

powered by: WebSVN 2.1.0

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