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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [super-dealloc-1.m] - Rev 313

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) dealloc;
@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) dealloc {
  casa = 0;
  [super some_other];
}  /* { dg-warning "method possibly missing a .super dealloc. call" } */
@end
 
@implementation Baz
- (void) dealloc {
  usa = 0;
  [super dealloc];  /* Should not warn here.  */
}
@end
 

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

powered by: WebSVN 2.1.0

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