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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [bitfield-4.m] - Blame information for rev 801

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

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

powered by: WebSVN 2.1.0

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