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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [bitfield-5.mm] - Blame information for rev 750

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

Line No. Rev Author Line
1 703 jeremybenn
 
2
/* Make sure that bitfield types are printed correctly, and that ivar redeclaration
3
  (@interface vs. @implementation) checks take the bitfield width into account.  */
4
/* Author: Ziemowit Laski     */
5
/* { dg-do compile } */
6
 
7
@interface Base {
8
  int i;
9
}
10
@end
11
 
12
@interface WithBitfields: Base {
13
  void *isa;
14
  unsigned a: 3;
15
  signed b: 4;
16
  int c: 5;
17
}
18
@end
19
 
20
@implementation WithBitfields {
21
  char *isa;  /* { dg-error "conflicting instance variable type .char \\*isa." } */
22
  /* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } 13 } */
23
  unsigned a: 5;  /* { dg-error "conflicting instance variable type .unsigned( int)? a: 5." } */
24
  /* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } 14 } */
25
  signed b: 4;  /* This one is fine. */
26
  int c: 3;  /* { dg-error "conflicting instance variable type .int c: 3." } */
27
  /* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } 16 } */
28
}
29
@end

powered by: WebSVN 2.1.0

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