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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [obj-c++.dg/] [bitfield-5.mm] - Diff between revs 308 and 384

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

Rev 308 Rev 384
/* Make sure that bitfield types are printed correctly, and that ivar redeclaration
/* Make sure that bitfield types are printed correctly, and that ivar redeclaration
  (@interface vs. @implementation) checks take the bitfield width into account.  */
  (@interface vs. @implementation) checks take the bitfield width into account.  */
/* Author: Ziemowit Laski     */
/* Author: Ziemowit Laski     */
/* { dg-do compile } */
/* { dg-do compile } */
@interface Base {
@interface Base {
  int i;
  int i;
}
}
@end
@end
@interface WithBitfields: Base {
@interface WithBitfields: Base {
  void *isa;
  void *isa;
  unsigned a: 3;
  unsigned a: 3;
  signed b: 4;
  signed b: 4;
  int c: 5;
  int c: 5;
}
}
@end
@end
@implementation WithBitfields {
@implementation WithBitfields {
  char *isa;  /* { dg-error "conflicting instance variable type .char \\*isa." } */
  char *isa;  /* { dg-error "conflicting instance variable type .char \\*isa." } */
  /* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } 13 } */
  /* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } 13 } */
  unsigned a: 5;  /* { dg-error "conflicting instance variable type .unsigned( int)? a: 5." } */
  unsigned a: 5;  /* { dg-error "conflicting instance variable type .unsigned( int)? a: 5." } */
  /* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } 14 } */
  /* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } 14 } */
  signed b: 4;  /* This one is fine. */
  signed b: 4;  /* This one is fine. */
  int c: 3;  /* { dg-error "conflicting instance variable type .int c: 3." } */
  int c: 3;  /* { dg-error "conflicting instance variable type .int c: 3." } */
  /* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } 16 } */
  /* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } 16 } */
}
}
@end
@end
 
 

powered by: WebSVN 2.1.0

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