linux下编程用 编译软件

源代码在线查看: addr-const1.c

软件大小: 49607 K
上传用户: IsABC
关键词: linux 编程 编译 软件
下载地址: 免注册下载 普通下载 VIP

相关代码

				// { dg-do run }								// Copyright (C) 2003 Free Software Foundation, Inc.				// Contributed by Nathan Sidwell 19 Apr 2003 								// PR 9881. address-constant-expression not static initialized								struct 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 initializers								double *foo::a = &(((bar *)(&v))->p);				double *foo::b = &(((bar *)(&foo::storage))->p);				double foo::storage = 0.0;								int main() {				  return error;				}							

相关资源