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

📄 addr-const1.c

📁 用于进行gcc测试
💻 C
字号:
// { dg-do run }// Copyright (C) 2003 Free Software Foundation, Inc.// Contributed by Nathan Sidwell 19 Apr 2003 <nathan@codesourcery.com>// PR 9881. address-constant-expression not static initializedstruct bar {  double p;}; // bar    bar v;static bool error = false;struct foo {  static double *a;  static double *b;  static double storage;};struct baz {  baz () {    if (foo::a != &v.p)      error = true;    if (foo::b != &foo::storage)      error = true;  }};baz f; // Get constructor to run before any other non-static initializersdouble *foo::a = &(((bar *)(&v))->p);double *foo::b = &(((bar *)(&foo::storage))->p);double foo::storage = 0.0;int main() {  return error;}

⌨️ 快捷键说明

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