diff options
author | Jeffrey A Law <law@cygnus.com> | 2000-04-12 06:53:34 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2000-04-12 00:53:34 -0600 |
commit | f304f9bb6c621a25debcbaa82a17e473a7630850 (patch) | |
tree | 88475ee0cdf090039a5f9bb02232b59e9507691e /gcc/invoke.texi | |
parent | 8487eac9d14c7bf465a1874b15143d3e7f0fd1e1 (diff) | |
download | gcc-f304f9bb6c621a25debcbaa82a17e473a7630850.tar.gz |
Install the vthunks patch onto the gcc-2.95 branch.
From-SVN: r33091
Diffstat (limited to 'gcc/invoke.texi')
-rw-r--r-- | gcc/invoke.texi | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/invoke.texi b/gcc/invoke.texi index 571348e151f..b7faa6b78c8 100644 --- a/gcc/invoke.texi +++ b/gcc/invoke.texi @@ -1186,7 +1186,7 @@ anachronism. Therefore, by default it is invalid to assign to type @samp{X *}. However, for backwards compatibility, you can make it valid with @samp{-fthis-is-variable}. -@item -fvtable-thunks +@item -fvtable-thunks=@var{thunks-version} Use @samp{thunks} to implement the virtual function dispatch table (@samp{vtable}). The traditional (cfront-style) approach to implementing vtables was to store a pointer to the function and two @@ -1194,13 +1194,27 @@ offsets for adjusting the @samp{this} pointer at the call site. Newer implementations store a single pointer to a @samp{thunk} function which does any necessary adjustment and then calls the target function. +The original implementation of thunks (version 1) had a bug regarding +virtual base classes; this bug is fixed with version 2 of the thunks +implementation. With setting the version to 2, compatibility to the +version 1 thunks is provided, at the cost of extra machine code. Version +3 does not include this compatibility. + This option also enables a heuristic for controlling emission of vtables; if a class has any non-inline virtual functions, the vtable will be emitted in the translation unit containing the first one of those. Like all options that change the ABI, all C++ code, @emph{including -libgcc.a} must be built with the same setting of this option. +libgcc.a} must be built with the same setting of this option. Since +version 1 and version 2 are also incompatible (for classes with virtual +bases defining virtual functions), all code must also be compiled with +the same version. + +On some targets (e.g. Linux/GNU), version 2 thunks are the default. On these +targets, no option or -fvtable-thunks will produce version 2 thunks. On +all other targets, not giving the option will use the traditional +implementation, and -fvtable-thunks will produce version 2 thunks. @item -nostdinc++ Do not search for header files in the standard directories specific to |