From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dale Johannesen To: dewar@gnat.com Cc: Dale Johannesen , aldyh@redhat.com, gcc@gcc.gnu.org Subject: Re: new __builtin_choose_type (patch) Date: Tue, 02 Oct 2001 12:29:00 -0000 Message-id: <200110021929.MAA13101@scv3.apple.com> References: <20011002190245.C96B6F28AB@nile.gnat.com> X-SW-Source: 2001-10/msg00085.html On Tuesday, October 2, 2001, at 12:02 PM, dewar@gnat.com wrote: > This seems a bit of a kludgy feature to me. Do we really need to add > overloading to C for this purpose? If so, surely it should be done > in a manner that is coherent with the rest of the language. Well, the Altivec extensions require overloading, but this doesn't necessarily have to be visible to everybody else. Motorola's approach (also used by Apple, at least for now) was to define a hook for target-dependent builtins, so the overloading stuff could be hidden down in rs6000.c. OTOH, overloading is in C99 already for the math lib functions, isn't it? Personally I don't think overloading belongs in C, but if we're stuck with it anyway, maybe a general mechanism is a good idea.