* call.c (build_field_call): handle static data members too
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Tue, 15 Sep 1998 17:04:53 +0000 (17:04 +0000)
committerAlexandre Oliva <oliva@gcc.gnu.org>
Tue, 15 Sep 1998 17:04:53 +0000 (17:04 +0000)
From-SVN: r22433

gcc/cp/ChangeLog
gcc/cp/call.c

index 6311f9433d9df289fa24893d2642a1e82debac9c..d1d68ac821b10032679bf19980722a625e46bea6 100644 (file)
@@ -1,5 +1,7 @@
 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * 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
 
index d27d61614542ac404489e7ca54a8f425a950e21d..adec61c60147ecb97c7dc4d96d0c0df4127c804f 100644 (file)
@@ -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);