This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,c++] introduce cp_build_function_call_nary
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Nathan Froyd <froydnj at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 May 2010 19:04:20 +0000 (UTC)
- Subject: Re: [PATCH,c++] introduce cp_build_function_call_nary
- References: <20100526112019.GI3534@codesourcery.com> <4BFD5960.8050605@codesourcery.com>
On Wed, 26 May 2010, Mark Mitchell wrote:
> Nathan Froyd wrote:
>
> > * cp-tree.h (cp_build_function_call_nary): Declare.
> > * typeck.c (cp_build_function_call_nary): Define.
>
> I like this idea, but I think that instead of "nargs", a NULL-terminated
> list of trees is a more robust way of expressing this interface. A
> NULL_TREE argument isn't valid, so I don't think that's ambiguous, and I
> think it's easier to get:
>
> cp_build_function_call_nary (..., arg1, arg2, NULL_TREE);
>
> right when you add in "arg3", then it is to remember to change the
> number-of-arguments parameter.
If adding a variadic function with NULL-termination convention to GCC,
please also mark it with ATTRIBUTE_SENTINEL so that missing NULL
termination can be detected when GCC is built.
--
Joseph S. Myers
joseph@codesourcery.com