This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: new __builtin_choose_type (patch)
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.
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