summaryrefslogtreecommitdiffstats
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-06 17:06:00 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-06 17:06:00 +0000
commitde5ad4cbc096f6ca683043dc57320392b7aa7e65 (patch)
tree5aec6c4a3744887da7a7770ae253757125a43453 /gcc/cp/tree.c
parentea6eef511fd789b3d988662273c2bee3397be428 (diff)
downloadppe42-gcc-de5ad4cbc096f6ca683043dc57320392b7aa7e65.tar.gz
ppe42-gcc-de5ad4cbc096f6ca683043dc57320392b7aa7e65.zip
PR c++/26696
* cvt.c (convert_to_void): Replace a subexpression with no side effects with void_zero_node. * tree.c (is_overloaded_fn): Look through COMPONENT_REF. (get_first_fn): Ditto. * decl.c (grokdeclarator): No need to look through COMPONENT_REF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116724 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index db7e40a9cd4..89941cc5542 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -853,7 +853,8 @@ int
is_overloaded_fn (tree x)
{
/* A baselink is also considered an overloaded function. */
- if (TREE_CODE (x) == OFFSET_REF)
+ if (TREE_CODE (x) == OFFSET_REF
+ || TREE_CODE (x) == COMPONENT_REF)
x = TREE_OPERAND (x, 1);
if (BASELINK_P (x))
x = BASELINK_FUNCTIONS (x);
@@ -880,6 +881,8 @@ get_first_fn (tree from)
{
gcc_assert (is_overloaded_fn (from));
/* A baselink is also considered an overloaded function. */
+ if (TREE_CODE (from) == COMPONENT_REF)
+ from = TREE_OPERAND (from, 1);
if (BASELINK_P (from))
from = BASELINK_FUNCTIONS (from);
return OVL_CURRENT (from);
OpenPOWER on IntegriCloud