From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: loewis@informatik.hu-berlin.de Cc: egcs@cygnus.com Subject: An OVL_CURRENT patch? Date: Sat, 09 May 1998 17:36:00 -0000 Message-id: X-SW-Source: 1998-05/msg00336.html Hi, Does this patch make any sense? Should we check all usages of TREE_VEC_ELT to see if OVL_CURRENT is needed? Thanks. -- H.J. Lu (hjl@gnu.org) --- Sat May 9 17:30:35 1998 H.J. Lu (hjl@gnu.org) * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT. * decl2.c (constructor_name_full): Likewise. Index: class.c =================================================================== RCS file: /home/work/cvs/gnu/egcs/gcc/cp/class.c,v retrieving revision 1.1.1.29 diff -u -p -r1.1.1.29 class.c --- class.c 1998/05/09 20:35:19 1.1.1.29 +++ class.c 1998/05/10 00:23:49 @@ -3705,7 +3705,8 @@ finish_struct_1 (t, warn_anon) name = DECL_NAME (fdecl); for (; i < n_methods; i++) - if (DECL_NAME (TREE_VEC_ELT (method_vec, i)) == name) + if (DECL_NAME (OVL_CURRENT (TREE_VEC_ELT (method_vec, i))) + == name) { cp_error ("cannot adjust access to `%#D' in `%#T'", fdecl, t); cp_error_at (" because of local method `%#D' with same name", @@ -3821,7 +3822,8 @@ finish_struct_1 (t, warn_anon) continue; for (; i < n_methods; ++i) - if (DECL_NAME (TREE_VEC_ELT (method_vec, i)) == name) + if (DECL_NAME (OVL_CURRENT (TREE_VEC_ELT (method_vec, i))) + == name) { cp_error_at ("data member `%#D' conflicts with", x); cp_error_at ("function member `%#D'", Index: decl2.c =================================================================== RCS file: /home/work/cvs/gnu/egcs/gcc/cp/decl2.c,v retrieving revision 1.1.1.33 diff -u -p -r1.1.1.33 decl2.c --- decl2.c 1998/05/09 20:35:27 1.1.1.33 +++ decl2.c 1998/05/10 00:28:21 @@ -1982,7 +1982,7 @@ constructor_name_full (thing) else if (IS_AGGR_TYPE_CODE (TREE_CODE (thing))) { if (TYPE_WAS_ANONYMOUS (thing) && TYPE_HAS_CONSTRUCTOR (thing)) - thing = DECL_NAME (TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (thing), 0)); + thing = DECL_NAME (OVL_CURRENT (TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (thing), 0))); else thing = TYPE_NAME (thing); }