snapshot 20010514: -fno-vtable-thunks

Eberhard Mattes mattes@azu.informatik.uni-stuttgart.de
Fri Jun 1 02:16:00 GMT 2001


Support for -fno-vtable-thunks seems to have been partially removed:

- DEFAULT_VTABLE_THUNK is no longer used, but it's still defined (even
  as zero) for some targets and it is still documented

- A comment in cp/decl2.c contradicts the code (the default is *on*):

	/* True if we want to implement vtables using "thunks".
	   The default is off.  */
	
	int flag_vtable_thunks = 1;

- And finally, the implementation of -fno-vtable-thunks is
  broken:

  ////////////////////////////////////////////////////////////////////////////
  struct foo
  {
    virtual void bar ();
  };
  ////////////////////////////////////////////////////////////////////////////
  
  <internal>:0: the ABI requires vtable thunks
  foo.cc:2: cannot convert `void*' to `int' in initialization
  foo.cc:2: cannot convert `const __vtbl_ptr_type' to `int' in initialization

If -fno-vtable-thunks is supposed to have been removed, the current
behavior and documentation is confusing.

If -fno-vtable-thunks is supposed to still work, it needs fixing.

-- 
  Eberhard Mattes



More information about the Gcc-bugs mailing list