gcc-you can use this code to learn something about gcc, and inquire further into linux,

源代码在线查看: ctor2.c

软件大小: 30471 K
上传用户: wwangllei
关键词: something gcc-you further inquire
下载地址: 免注册下载 普通下载 VIP

相关代码

				// PR c++/4460				// Test that the cleanup for fully-constructed subobjects when a				// constructor throws gets the right address for a virtual base.								// { dg-do run }								int r;				void *p;								struct VBase				{				  virtual void f () {}				  VBase() { p = this; }				  ~VBase() { if (p != this) r = 1; }				};								struct  StreamBase 				{				  virtual ~StreamBase() {}				};								struct  Stream : public virtual VBase, public StreamBase				{				  Stream() {}				  virtual ~Stream() {} 				};								struct DerivedStream : public Stream				{				  DerivedStream() { throw 1; }				};								int main() {								  try				    { 				      DerivedStream str;				    }				  catch (...) { }								  return r;				}							

相关资源