[Python-Dev] test_itertools fails for trunk on x86 OS X machine (original) (raw)
Neal Norwitz nnorwitz at gmail.com
Fri Sep 22 07:23:54 CEST 2006
- Previous message: [Python-Dev] test_itertools fails for trunk on x86 OS X machine
- Next message: [Python-Dev] test_itertools fails for trunk on x86 OS X machine
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 9/21/06, Jack Diederich <jackdied at jackdied.com> wrote:
I should leave the tounge-in-cheek bombast to Tim and Frederik, especially when dealing with what might be an OS & machine specific bug. The next checkin and re-test will or won't highlight a failure and certainly someone with a g4 will try it out before 2.5.1 goes out so we'll know if it was a fluke soonish. The original error was mine, I typed "Sizet" instead of "Ssizet" and while my one-char patch might also be wrong (I hope not, I'm red-faced enough as is) we should find out soon enough.
It looks like %zd of a negative number is treated as an unsigned number on OS X, even though the man page says it should be signed.
""" The z modifier, when applied to a d or i conversion, indicates that the argument is of a signed type equivalent in size to a size_t. """
The program below returns -123 on Linux and 4294967173 on OS X.
n
#include <stdio.h> int main() { char buffer[256]; if(sprintf(buffer, "%zd", (size_t)-123) < 0) return 1; printf("%s\n", buffer); return 0; }
- Previous message: [Python-Dev] test_itertools fails for trunk on x86 OS X machine
- Next message: [Python-Dev] test_itertools fails for trunk on x86 OS X machine
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]