typeck.c (get_member_function_from_ptrfunc): Always consider virtuality inside member pointer.
* typeck.c (get_member_function_from_ptrfunc): Always consider virtuality inside member pointer. From-SVN: r29494
This commit is contained in:
parent
e9013db204
commit
03b256e4c6
@ -1,3 +1,8 @@
|
||||
1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
|
||||
|
||||
* typeck.c (get_member_function_from_ptrfunc): Always consider
|
||||
virtuality inside member pointer.
|
||||
|
||||
1999-09-17 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
Turn on function-at-a-time processing.
|
||||
|
@ -2821,13 +2821,13 @@ get_member_function_from_ptrfunc (instance_ptrptr, function)
|
||||
NULL_TREE, 0));
|
||||
e3 = PFN_FROM_PTRMEMFUNC (function);
|
||||
|
||||
if (TYPE_SIZE (basetype) != NULL_TREE
|
||||
&& ! TYPE_VIRTUAL_P (basetype))
|
||||
/* If basetype doesn't have virtual functions, don't emit code to
|
||||
handle that case. */
|
||||
e1 = e3;
|
||||
else
|
||||
{
|
||||
/* This used to avoid checking for virtual functions if basetype
|
||||
has no virtual functions, according to an earlier ANSI draft.
|
||||
With the final ISO C++ rules, such an optimization is
|
||||
incorrect: A pointer to a derived member can be static_cast
|
||||
to pointer-to-base-member, as long as the dynamic object
|
||||
later has the right member. */
|
||||
|
||||
/* Promoting idx before saving it improves performance on RISC
|
||||
targets. Without promoting, the first compare used
|
||||
load-with-sign-extend, while the second used normal load then
|
||||
@ -2880,7 +2880,6 @@ get_member_function_from_ptrfunc (instance_ptrptr, function)
|
||||
if (TREE_CODE (instance_ptr) == SAVE_EXPR)
|
||||
e1 = build (COMPOUND_EXPR, TREE_TYPE (e1),
|
||||
instance_ptr, e1);
|
||||
}
|
||||
|
||||
*instance_ptrptr = build (PLUS_EXPR, TREE_TYPE (instance_ptr),
|
||||
instance_ptr, delta);
|
||||
|
Loading…
Reference in New Issue
Block a user