Builtins and C++ and such

Jason Merrill jason@redhat.com
Wed Mar 20 02:36:00 GMT 2002


>>>>> "Gabriel" == Gabriel Dos Reis <gdr@codesourcery.com> writes:

> I'm strongly of the opinion of Jason that, even though the ideal
> would be to have the library do most of the dirty work, the compiler
> ought to assist us through some extensions.

Actually, I disagree about the ideal.  I think the compiler is The Right
Place for this stuff.

> Here is a fourth suggestion.
> Suppose for a moment that the compiler is smart enought (or can be
> made smart) to replace a reference to a function by the
> referenced function where possible, then we could say:

>    void(&memcpy)(void*, const void*, size_t) = __builtin_memcpy;

Again, this would involve putting the library through contortions in order
to tell the compiler about itself.

Jason



More information about the Gcc mailing list