This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Use gen-as-const.py to process .pysym files


On Dez 04 2018, Joseph Myers <joseph@codesourcery.com> wrote:

> The more correct positive values by themselves produce a failure of
> nptl/test-mutexattr-printers, because masking with
> ~PTHREAD_MUTEXATTR_FLAG_BITS & ~PTHREAD_MUTEX_NO_ELISION_NP now leaves
> a bit -1 << 32 in the Python value, resulting in a KeyError exception.
> To avoid that, places masking with ~ of one of the constants in
> question are changed to mask with 0xffffffff as well (this reflects
> how ~ in Python applies to an infinite-precision integer whereas ~ in
> C does not do any promotions beyond the width of int).

If ~ doesn't reflect C semantics then ^ 0xffffffff would be better.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


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