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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc.dg/] [super-dealloc-1.m] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* Check for warnings about missing [super dealloc] calls.  */
/* Check for warnings about missing [super dealloc] calls.  */
/* Author: Ziemowit Laski <zlaski@apple.com>  */
/* Author: Ziemowit Laski <zlaski@apple.com>  */
 
 
/* { dg-do compile } */
/* { dg-do compile } */
 
 
@interface Foo {
@interface Foo {
  void *isa;
  void *isa;
}
}
- (void) dealloc;
- (void) dealloc;
- (void) some_other;
- (void) some_other;
@end
@end
 
 
@interface Bar: Foo {
@interface Bar: Foo {
  void *casa;
  void *casa;
}
}
- (void) dealloc;
- (void) dealloc;
@end
@end
 
 
@interface Baz: Bar {
@interface Baz: Bar {
  void *usa;
  void *usa;
}
}
- (void) dealloc;
- (void) dealloc;
@end
@end
 
 
@implementation Foo
@implementation Foo
- (void) dealloc {
- (void) dealloc {
  isa = 0;   /* Should not warn here.  */
  isa = 0;   /* Should not warn here.  */
}
}
- (void) some_other {
- (void) some_other {
  isa = (void *)-1;
  isa = (void *)-1;
}
}
@end
@end
 
 
@implementation Bar
@implementation Bar
- (void) dealloc {
- (void) dealloc {
  casa = 0;
  casa = 0;
  [super some_other];
  [super some_other];
}  /* { dg-warning "method possibly missing a .super dealloc. call" } */
}  /* { dg-warning "method possibly missing a .super dealloc. call" } */
@end
@end
 
 
@implementation Baz
@implementation Baz
- (void) dealloc {
- (void) dealloc {
  usa = 0;
  usa = 0;
  [super dealloc];  /* Should not warn here.  */
  [super dealloc];  /* Should not warn here.  */
}
}
@end
@end
 
 

powered by: WebSVN 2.1.0

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