On Sat, 2005-05-21 at 21:32 -0700, Zack Weinberg wrote:
> Daniel Berlin <[EMAIL PROTECTED]> writes:
> 
> > I've actually discovered that we set the assembler name on a field that
> > is the vtable, but never actually use it again, at least for DWARF2 and
> > STABS (it's set to a constant called VFIELD_NAME).
> > I grepped .s file from all of libjava and the stl testcases compared
> > with -gstabs and -gdwarf-2, and none of them contain VFIELD_NAME with or
> > without my change.
> 
> This appears to be mostly vestigial old ABI stuff.  VFIELD_NAME_P is
> used to special-case the vtable pointer in the default copy
> constructor and assignment operator (see cp/method.c:
> do_build_copy_constructor, do_build_assign_ref respectively) but that
> can and probably should be changed.  Even if it's kept, it would
> suffice to use the DECL_NAME, not the DECL_ASSEMBLER_NAME, for that.
> 
Thanks.
In fact, it's already, checking DECL_NAME, which is still set by the
build_decl call above the one setting the assembler name (IE nothing has
changed).


IE:

      field = build_decl (FIELD_DECL, get_vfield_name (t),
vtbl_ptr_type_node);
      SET_DECL_ASSEMBLER_NAME (field, get_identifier (VFIELD_NAME));


and then
[EMAIL PROTECTED]:/mnt/gccstuff/gcc-cleaning-decls/gcc/cp> grep
VFIELD_NAME_P *.c
method.c:             if (VFIELD_NAME_P (DECL_NAME (field)))
method.c:             if (VFIELD_NAME_P (DECL_NAME (field)))

So the check will still succeed when it should without the assembler
name :).

Overnight i compiled libjava with and without the line setting the
assembler name, and the .s files are identical



> zw

Reply via email to