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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [super-dealloc-2.m] - Blame information for rev 704

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* Check for warnings about missing [super dealloc] calls.  */
2
/* Author: Ziemowit Laski <zlaski@apple.com>  */
3
 
4
/* { dg-do compile } */
5
 
6
@interface Foo {
7
  void *isa;
8
}
9
- (void) dealloc;
10
- (void) some_other;
11
@end
12
 
13
@interface Bar: Foo {
14
  void *casa;
15
}
16
- (void) dealloc0;
17
@end
18
 
19
@interface Baz: Bar {
20
  void *usa;
21
}
22
- (void) dealloc;
23
@end
24
 
25
@implementation Foo
26
- (void) dealloc {
27
  isa = 0;   /* Should not warn here.  */
28
}
29
- (void) some_other {
30
  isa = (void *)-1;
31
}
32
@end
33
 
34
@implementation Bar
35
- (void) dealloc0 {
36
  casa = 0;
37
  [super some_other];  /* Should not warn here.  */
38
}
39
@end
40
 
41
@implementation Baz
42
- (void) dealloc {
43
  usa = 0;
44
  [super dealloc0];
45
} /* { dg-warning "method possibly missing a .super dealloc. call" } */
46
@end

powered by: WebSVN 2.1.0

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