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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc.dg/] [method-1.m] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Tests of duplication.  */
2
/* { dg-do compile } */
3
 
4
@interface class1
5
- (int) meth1;
6
- (void) meth1;  /* { dg-error "duplicate declaration of method .\\-meth1." } */
7
@end
8
 
9
@interface class2
10
+ (void) meth1;
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 "previous definition" } */
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 "previous definition" } */
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.