⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 layout2.c

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 C
字号:
// Red Hat bugzilla 65210// { dg-do run }struct A {    int a;};struct B : public virtual A {};struct C {  long double c;};struct D : public virtual C {    int d;};struct E : public B, public D {    int e;};E e;/* The layout of E should begin with the B-in-E vtable pointer, followed by   the D-in-E vtable pointer.  The bug was that we used to pad out the D   fields for long double alignment.  */int main (){  D* dp = &e;  unsigned long d_offset = ((char*)dp) - ((char*) &e);  return (d_offset != sizeof(void *));}

⌨️ 快捷键说明

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