bitfield-4.m
来自「Mac OS X 10.4.9 for x86 Source Code gcc」· M 代码 · 共 29 行
M
29 行
/* Make sure that bitfield types are printed correctly, and that ivar redeclaration (@interface vs. @implementation) checks take the bitfield width into account. *//* Author: Ziemowit Laski <zlaski@apple.com> *//* { dg-do compile } */@interface Base { int i;}@end@interface WithBitfields: Base { void *isa; unsigned a: 3; signed b: 4; int c: 5;}@end@implementation WithBitfields { char *isa; /* { dg-error "conflicting instance variable type .char \\*isa." } */ /* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } 12 } */ unsigned a: 5; /* { dg-error "conflicting instance variable type .unsigned( int)? a: 5." } */ /* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } 13 } */ signed b: 4; /* This one is fine. */ int c: 3; /* { dg-error "conflicting instance variable type .int c: 3." } */ /* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } 15 } */ }@end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?