Strange Errors with Python-2.2.2

Christian Tismer tismer at tismer.com
Sun Dec 22 20:15:32 EST 2002


Erik Max Francis wrote:
> lemonite wrote:
> 
> 	...
> 
>>        printf("fractional part = %f\ninteger part = %f\n",
>>                                        modf(x, &y), y);
> 
> 	...
> 
>>The expected output should look like this:
> 
> 
> There is no expected output, since you're invoking unspecified behavior.

Yes that's fine, but please keep in mind that lemonite
complained about plain wrong Python behavior, and
our lack of positive replies caused him to try some
testing in C code. That's a secondary effect.

> When the order in which things get evaluated matters, don't put them in
> function call arguments.  This is just operator error, not a gcc bug.

This is good advice.
But the real problem persists, and that is really
buggy compiler behavior since
int(1.1) should never print 0 .

I suggest that we now put our efforts into figuring
out what causes this bug, trying to reproduce it
and to find a way to avoid it. If that's possible,
an according config patch should go into the Pyhton dist.

Can anybody reproduce this behavior under GCC 3.2.1 and
Gentoo Linux 1.4rc, or is this independant from the Linux
version?
Or is it maybe someproblem with a wrong compiler option?
Lemonite, did you perhaps play with some options during
configure, maybe without knowledge? I think there is some
OPT environment variable that is evaluated at configure
time. Please make sure that this is not so.
Also, please do a "make distclean" and restart the configure.
I'd further recommend to look into the generated makefiles,
if the compiler options look trustworthy.

If the error persists after that, we have a problem.

ciao - chris
-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/






More information about the Python-list mailing list