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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [method-8.mm] - Blame information for rev 714

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

Line No. Rev Author Line
1 703 jeremybenn
/* Tests of duplication.  */
2
/* { dg-do compile } */
3
 
4
@interface class1
5
- (int) meth1;   /* { dg-message "previous declaration" } */
6
- (void) meth1;  /* { dg-error "duplicate declaration of method .\\-meth1." } */
7
@end
8
 
9
@interface class2
10
+ (void) meth1; /* { dg-message "previous declaration" } */
11
+ (int) meth1;  /* { dg-error "duplicate declaration of method .\\+meth1." } */
12
@end
13
 
14
@interface class3
15
- (int) meth1;
16
@end
17
 
18
@implementation class3
19
- (int) meth1 { return 0; } /* { dg-error "previously defined here" } */
20
- (int) meth1 { return 0; } /* { dg-error "redefinition of" } */
21
@end
22
 
23
@interface class4
24
+ (void) meth1;
25
@end
26
 
27
@implementation class4
28
+ (void) meth1 {} /* { dg-error "previously defined here" } */
29
+ (void) meth1 {} /* { dg-error "redefinition of" } */
30
@end

powered by: WebSVN 2.1.0

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