This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: new __builtin_choose_type (patch)
On Wed, 2001-10-03 at 15:42, Daniel Jacobowitz wrote:
> On Tue, Oct 02, 2001 at 11:15:14PM -0700, Richard Henderson wrote:
> > On Tue, Oct 02, 2001 at 06:54:04PM -0700, Geoff Keating wrote:
> > > What does va_arg do?
> >
> > va_arg is a grammar element rather than a builtin:
> >
> > | VA_ARG '(' expr_no_commas ',' typename ')'
> > { $$ = build_va_arg ($3, groktypename ($5)); }
> >
> > That's not to say that we can't do the same thing here... ;-)
>
> ... not to mention, if we make __builtin_choose_type into a grammar
> element, we could make its second argument into a -type-, rather than
> an unintuitive dummy variable.
>
hmmmm, hadn't thought about that. good point.
i'm kind of a fan of Magnus' suggestion though-- but mainly because i
already implemented it :) and because my last approach turned out to be
horrendous after i got it coded "correctly".
the builtin_equal_types() approach is simpler in my opinion
(implementation wise).
> --
> Daniel Jacobowitz Carnegie Mellon University
> MontaVista Software Debian GNU/Linux Developer
--
Aldy Hernandez E-mail: aldyh@redhat.com
Professional Gypsy on a Motorcycle
Red Hat, Inc.