* call.c (build_field_call): handle static data members too

From-SVN: r22433
This commit is contained in:
Alexandre Oliva 1998-09-15 17:04:53 +00:00 committed by Alexandre Oliva
parent bb210aafb4
commit e1b81ca4fd
2 changed files with 5 additions and 2 deletions

View 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

View 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);