This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, TREE_LIST removal] remove calls to build_constructor_from_list from coverage.c
>>>>> "Nathan" == Nathan Froyd <froydnj@codesourcery.com> writes:
Nathan> There are two ways to fix this:
Nathan> - Modify java-tree.h:START_RECORD_CONSTRUCTOR to set
Nathan> TREE_CONSTANT to 0on the new constructor; or
Nathan> - Make build_constructor set TREE_CONSTANT to 0 when handed a 0-length
Nathan> vector.
These macros in gcj are just a convenience wrapper to make it simpler to
build constructors. AFAICT all the uses of these macros are of the form
START_RECORD_CONSTRUCTOR, followed by PUSH_* calls, followed by
FINISH_RECORD_CONSTRUCTOR.
So I think another approach would be to change START_RECORD_CONSTRUCTOR
to simply initialize the VEC, then modify PUSH_FIELD_VALUE, PUSH_SUPER_VALUE,
and FINISH_RECORD_CONSTRUCTOR to do the right thing -- in particular,
delaying the build_constructor call to FINISH_RECORD_CONSTRUCTOR.
Tom