[Patch / RFA] Use builtins for the classification macros

Paolo Carlini pcarlini@suse.de
Mon Nov 26 13:18:00 GMT 2007


Hi,
> On Mon, 26 Nov 2007, Paolo Carlini wrote:
>> Hi,
>>
>> I'm finishing testing on x86_64-linux this patch: in my experiments, we
>> get optimal code generation for constant arguments and we shave a couple
>> of K of templates from a very used header. Can you imagine anything
>> wrong with it? (I'm explicitly adding Richard in CC, as middle-end
>> maintainer).
>>     
> This should work.  Even in the original sources we eventually
> dispatch to gcc builtins dependent on libc implementation details.
>   
Thanks Richard. I just noticed that, with it, we get an ICE in
expr_size, at explow.c:249 (instead of the expected error), on the
testcase of libstdc++/25913:

#include <cmath>
#include <string>

struct employee
    : private std::string
{
};

struct manager
    : public employee
{
};

bool isnormal(const employee& e)
{
    return false;
}

int main()
{
    manager m;
    bool b = isnormal(m);
}

Can you look into that?

Thanks in advance,
Paolo.



More information about the Libstdc++ mailing list