This is the mail archive of the gcc@gcc.gnu.org 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]

Re: new __builtin_choose_type (patch)


On Wed, 2001-10-03 at 12:16, Andreas Schwab wrote:
> Aldy Hernandez <aldyh@redhat.com> writes:
> 
> |> > Usage examples:
> |> > 
> |> > __builtin_equal_types(x, y) ? no() : x = 10;
> |> > if(__builtin_equal_types(x, y))
> |> >   {
> |> >   }
> |> > else
> |> >   {
> |> >   }
> |> 
> |> then we'd have to generate:
> |> 
> |>    if (const)
> |>      {
> |>      }
> |>      etc
> |> 
> |> whereas with my approach, you wouldn't even have to generate a compare.
> 
> ??? The compiler will just optimize that comparison away.

was just trying to save the compiler some work.  but fear not my next
post has builtin_equal_types implemented :)

> 
> Andreas.
> 
> -- 
> Andreas Schwab                                  "And now for something
> Andreas.Schwab@suse.de				completely different."
> SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
> Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
-- 
Aldy Hernandez					E-mail: aldyh@redhat.com
Professional Gypsy on a Motorcycle
Red Hat, Inc.


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