Some questions about FIELD_DECL
Zack Weinberg
zack@codesourcery.com
Sun May 22 14:26:00 GMT 2005
Daniel Berlin <dberlin@dberlin.org> 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.
zw
More information about the Gcc
mailing list