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: __builtin_extend_pointer


>> I'm having problems finding any documentation at all (extend.texi,
>> builtins.def, builtins.c) so perhaps you can direct me to what, exactly,
>> you mean by "put some docs in the comments."
>
>There is a two line comment in libstdc++/libsupc++/eh_personality.cc
>  /* For targets with pointers smaller than the word size, we must
>extend the
>     pointer, and this extension is target dependent.  */
>There is a two line comment in gcc/except.c
>/* Convert a ptr_mode address ADDR_TREE to a Pmode address controlled by
>   POINTERS_EXTEND_UNSIGNED and return it.  */
>
>The two comments say essentially the same thing in different ways, and
>seems a sufficient explanation to me for the code, though it does
>require some understanding of the difference between ptr_mode and Pmode.
>
>I see the comments don't say anything about why we need to extend the
>pointer.  Maybe that is the problem?

Not really. I was expecting documentation at the point where the builtin
is defined, not where it was used. My mistake!

> I think that what we need is a section in
>the internal doc for internal built in functions.  I don't know where to
>put this, or how to word it, or how to structure it, etc.  If someone
>else can figure out how to solve this, then I am willing to put
>__builtin_extend_pointer docs there.

I think this would be great, but also don't know the details.

-benjamin


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