[patch libstdc++]: Fix LLP64 pointer-size issues for cxxabi, eh_alloc, and hash_bytes

Kai Tietz ktietz70@googlemail.com
Fri Dec 21 09:48:00 GMT 2012


2012/12/21 Paolo Carlini <paolo.carlini@oracle.com>:
> On 12/21/2012 10:36 AM, Kai Tietz wrote:
>>
>> well, issue isn't that 'long' is always 'ptrdiff_t'.
>
> But then, if we just change the type without paying attention to size (and
> alignment) aren't we looking for BIG ABI trouble?!?

Huh?  We have ABI-trouble due long is  too small to hold a
pointer-diff for llp64.  Intended is here 'pointer-size' AFAICS in
code, but with wrong assumption that a 'long' is always long enough.

 Btw I just checked all targets we have right now in gcc.  The type
ptrdiff_t is always either 'long', or 'int' (ilp32, lp64), and 'long
long' for LLP64.  Means ptrdiff_t gets always equal (or bigger) to
biggest pointer-size for target (AFAICS).

Kai



More information about the Libstdc++ mailing list