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]
Other format: [Raw text]

Re: Builtins and C++ and such


>>>>> "Roger" == Roger Sayle <roger@eyesopen.com> writes:

>> Why?  (Not meant to be a rhetorical question; I'm curious.)
>> 
>> Certainly, __builtin_memcpy is necessary -- but why gunk to turn
>> memcpy into __builtin_memcpy?  Isn't that something the library
>> headers can do for you, at least in C++ where you *had* to have
>> a declaration?  Do we really care about people who manually write
>> the declaration themselves?

> Amongst the issues that I hope would be fixed by the solution that
> we decide upon is the ISO C++ requirement that #include <string.h>
> defines both "::memcpy" and "std::memcpy" (i.e. in both the std and
> global namespaces).

I feel pretty strongly that that should be handled by the library, not the
compiler.  If the compiler sees a declaration in one namespace, it
shouldn't magically insert it into another namespace as well.

I'm amenable to providing compiler help in implementing the C header
shadowing stuff, but it should be something that's explicitly requested by
the library code.  Nathan Myers' original strategy had one or two requested
extensions that seemed reasonable, though they haven't been implemented
yet.

Jason


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