This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lto] PATCH: add varargs support to DWARF reader

Sandra Loosemore wrote:

2006-09-20 Sandra Loosemore <>

	* gcc/lto/lto.c (lto_varargs_cookie): Define.
	(lto_read_subroutine_type_subprogram_DIE): Robustify collection
	of formal parameters and make it handle varargs.
	(lto_read_unspecified_parameters_DIE): New.
	(lto_read_DIE): Add lto_read_unspecified_parameters_DIE to table.
	* gcc/lto/lto-tree.h (lto_varargs_cookie): Declare.
	* gcc/lto/lto-lang.c (lto_init): Initialize lto_varargs_cookie.

This looks good.

Is there a reason not to just return void_type_node directly from lto_read_unspecified_parameters_DIE? I believe that DWARF doesn't have a "void" type (using a null type pointer to indicate void in things like "void *") and, in any case, "void" is certainly not a valid parameter type. So, at the risk of being a bit cute, you could probably just return void_type_node directly, bypassing the cookie.

If that works, I think that's a bit better; otherwise, your version is perfectly fine.


Mark Mitchell
(650) 331-3385 x713

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]