OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [obj-c++.dg/] [super-dealloc-2.mm] - 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   */
/* Author: Ziemowit Laski   */
/* { 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) dealloc0;
- (void) dealloc0;
@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) dealloc0 {
- (void) dealloc0 {
  casa = 0;
  casa = 0;
  [super some_other];  /* Should not warn here.  */
  [super some_other];  /* Should not warn here.  */
}
}
@end
@end
@implementation Baz
@implementation Baz
- (void) dealloc {
- (void) dealloc {
  usa = 0;
  usa = 0;
  [super dealloc0];
  [super dealloc0];
} /* { dg-warning "method possibly missing a .super dealloc. call" } */
} /* { dg-warning "method possibly missing a .super dealloc. call" } */
@end
@end
 
 

powered by: WebSVN 2.1.0

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