URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [obj-c++.dg/] [super-dealloc-2.mm] - Rev 308
Go to most recent revision | Compare with Previous | Blame | View Log
/* Check for warnings about missing [super dealloc] calls. */
/* Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
@interface Foo {
void *isa;
}
- (void) dealloc;
- (void) some_other;
@end
@interface Bar: Foo {
void *casa;
}
- (void) dealloc0;
@end
@interface Baz: Bar {
void *usa;
}
- (void) dealloc;
@end
@implementation Foo
- (void) dealloc {
isa = 0; /* Should not warn here. */
}
- (void) some_other {
isa = (void *)-1;
}
@end
@implementation Bar
- (void) dealloc0 {
casa = 0;
[super some_other]; /* Should not warn here. */
}
@end
@implementation Baz
- (void) dealloc {
usa = 0;
[super dealloc0];
} /* { dg-warning "method possibly missing a .super dealloc. call" } */
@end
Go to most recent revision | Compare with Previous | Blame | View Log