欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

packed8.c

用于进行gcc测试
C
字号:
// PR c++/18378// NOTE: This test assumes packed structure layout differs from unpacked//       structure layout.  This isn't true, e.g., with the default//       arm-none-elf options.// { dg-options "-mstructure-size-boundary=8" { target arm-*-* } }class A{public:  int i;  A() {}  A(const A& a) { i = a.i; }};class B{  A a __attribute__((packed)); // { dg-warning "attribute ignored" "" { target default_packed } }public:  B() {}  A GetA() { return a; } // { dg-error "" "" { target { ! default_packed } } }};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -