[Patch / RFA] Use builtins for the classification macros

Richard Guenther rguenther@suse.de
Mon Nov 26 17:00:00 GMT 2007


On Mon, 26 Nov 2007, Paolo Carlini wrote:

> Richard Guenther wrote:
> > I'll have a look tomorrow.
> >   
> Thanks a lot Richard. By the way, I decided to add today's improvement
> together with fixing libstdc++/25913 itself. Which means, all the
> functions in namespace std will be guarded with enable_if and, likely,
> tomorrow the testcase will not fail anymore for you. However, preparing
> a reproducer should be absolutely trivial: just feed __builtin_isnormal
> a user defined type...

It seems to be more tricky -- in fact it looks like a C++ frontend
issue (and happens with all variable args aka type-generic builtins).

But I don't know for sure which part of GCC should do type verification
here (they all have the 'type generic' attribute set on them) -- atm
they all expect a single REAL_TYPE argument.  So, for the testcase
we get:

244       if (TREE_CODE (exp) == WITH_SIZE_EXPR)
245         size = TREE_OPERAND (exp, 1);
246       else
247         {
248           size = lang_hooks.expr_size (exp);
249           gcc_assert (size);

zero for size from the langhook ;)

Richard.

-- 
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex



More information about the Libstdc++ mailing list