This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: a question about fix-header.c
Daniel Berlin <dberlin@dberlin.org> writes:
> On Thu, 20 Jan 2005, Zack Weinberg wrote:
>
>>> Kenneth Zadeck wrote:
>>>>
>>>> I would like to modify fix includes so that it adds the attribute
>>>> "pointer-no-escape" onto the function definition of free in stdlib.h
>>>> (and possibly some other fuctions as well).
>>
>> I seem to have lost the original of this message, so I'm going to
>> throw my comment in here despite its having nothing to do with what
>> Bruce said.
>>
>> You should not be solving this problem by editing system headers.
>> The proper way to add attributes to standard C library functions is
>> with builtins. See e.g. the handling of BUILT_IN_MALLOC.
>
> Yes, yes, we know.
> That and getting glibc/whoever to put the attributes in the headers
> for us, like they do with attribute malloc
> This is just for purpoess of testing the attribute without having to
> muck up the system headers on the machines we build and test on, it's
> not planned on being submitted or committed
You realize it's probably a lot easier to do it with builtins, anyway?
zw