diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-16 21:04:16 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-16 21:04:16 +0000 |
commit | ad8563d3c838fa1747718ea968e23dd30e91cdf9 (patch) | |
tree | 16e7fa4a4f75d64c88739f365852659a4d7d52d9 | |
parent | af8c41c438d497e2f38dba1733dbe89b84fbd42e (diff) | |
download | ppe42-gcc-ad8563d3c838fa1747718ea968e23dd30e91cdf9.tar.gz ppe42-gcc-ad8563d3c838fa1747718ea968e23dd30e91cdf9.zip |
* cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
* method.c (use_thunk): Correct handling of vcall offsets.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35064 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/cp-tree.h | 4 | ||||
-rw-r--r-- | gcc/cp/method.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index a87a8b777fb..bba76feab8b 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3101,10 +3101,10 @@ extern int flag_new_for_scope; `this' pointer when this function is called. */ #define THUNK_DELTA(DECL) (DECL_CHECK (DECL)->decl.u1.i) -/* An integer indicating how many bytes should be subtracted from the +/* A tree indicating how many bytes should be subtracted from the vtable for the `this' pointer to find the vcall offset. (The vptr is always located at offset zero from the f `this' pointer.) If - zero, then there is no vcall offset. */ + NULL, then there is no vcall offset. */ #define THUNK_VCALL_OFFSET(DECL) \ (DECL_LANG_SPECIFIC (DECL)->decl_flags.u2.vcall_offset) diff --git a/gcc/cp/method.c b/gcc/cp/method.c index f8e9bc2b944..0926021afc0 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -2267,7 +2267,7 @@ use_thunk (thunk_fndecl, emit_p) t = fold (build (PLUS_EXPR, TREE_TYPE (a), a, t)); /* If there's a vcall offset, look up that value in the vtable and adjust the `this' pointer again. */ - if (!integer_zerop (vcall_offset)) + if (vcall_offset && !integer_zerop (vcall_offset)) { tree orig_this; |