Replace absolute linenrs in objc.dg,obj-c++.dg
[official-gcc.git] / gcc / testsuite / obj-c++.dg / bitfield-5.mm
blob3b0065d7f61847262d170b53087ca86c26d726eb
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   <zlaski@apple.com>  */
5 /* { dg-do compile } */
7 @interface Base {
8   int i;
10 @end
12 @interface WithBitfields: Base {
13   void *isa;     /* { dg-line WithBitfields_isa } */
14   unsigned a: 3; /* { dg-line WithBitfields_a } */
15   signed b: 4;
16   int c: 5;      /* { dg-line WithBitfields_c } */
18 @end
20 @implementation WithBitfields {
21   char *isa;  /* { dg-error "conflicting instance variable type .char \\*isa." } */
22   /* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } WithBitfields_isa } */
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 *-*-* } WithBitfields_a } */
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 *-*-* } WithBitfields_c } */ 
29 @end