From e1b81ca4fdb63aa7cd94baf57a9799644b46a29e Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 15 Sep 1998 17:04:53 +0000 Subject: [PATCH] * call.c (build_field_call): handle static data members too From-SVN: r22433 --- gcc/cp/ChangeLog | 2 ++ gcc/cp/call.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6311f94..d1d68ac 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 1998-09-15 Alexandre Oliva + * call.c (build_field_call): handle static data members too + * typeck.c (comptypes): when comparing pointer types, check whether referred types match even in strictest modes diff --git a/gcc/cp/call.c b/gcc/cp/call.c index d27d616..adec61c 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -136,7 +136,7 @@ build_field_call (basetype_path, instance_ptr, name, parms) return error_mark_node; } - if (TREE_CODE (field) == FIELD_DECL) + if (TREE_CODE (field) == FIELD_DECL || TREE_CODE (field) == VAR_DECL) { /* If it's a field, try overloading operator (), or calling if the field is a pointer-to-function. */ @@ -167,7 +167,8 @@ build_field_call (basetype_path, instance_ptr, name, parms) if (field == error_mark_node) return error_mark_node; - if (field && TREE_CODE (field) == FIELD_DECL) + if (field && (TREE_CODE (field) == FIELD_DECL || + TREE_CODE (field) == VAR_DECL)) { tree basetype; tree ftype = TREE_TYPE (field); -- 2.7.4