[plt-scheme] miscaellanous packaging problems with plt-scheme

From: Guillaume Rousse (rousse at ccr.jussieu.fr)
Date: Mon Aug 23 07:50:13 EDT 2004

Matthew Flatt wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> I finally got back to the gcc 3.4.1 problem, and I can confirm that
> MzScheme doesn't build correctly.
> 
> The problem is illustrated by the little program below:
> 
>  Compiler   Optimization    Printout
>  gcc 3.2.2                   0 1
>  gcc 3.2.2    -O2            0 1
>  gcc 3.4.1                   0 1
>  gcc 3.4.1    -O2            0 0    <------ different
In case it could matters, standard mdk rpm optimisation flags are:
--O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro

> The intent of the code, of course, is to compare a pair of doubles
> byte-by-byte. It's possible that I still misunderstand aliasing in C99,
> so if anyone knows what I've done wrong and/or how I should write this
> to get the intended result, please let me know. (In MzScheme, I
> actually want to detect -0.0, so I would be nearly as happy to learn
> about a library function that will detect negative zero for me.)
> 
> Removing the "inline" declaration makes gcc 3.4.1 with -O2 behave like
> the other cases. I think I may have had the "inline" disabled in v207,
> which would explain the v207 versus v208 difference.
> 
> Matthew
> 
> ----------------------------------------
> 
> #include <stdio.h>
> 
> double zero = 0.0;
> 
> inline int zero_p(double d)

> {
>   /* Relies on 4-byte "int": */
[..]
In which file exactly ?

I can't find version prototype in the whole 208 tree:
[guillomovitch at n2 plt]$ grep -r "zero_p(double d)" *
src/mzscheme/src/number.c:int minus_zero_p(double d)
src/mzscheme/src/number.c:int scheme_minus_zero_p(double d)
src/mzscheme/src/schpriv.h:int scheme_minus_zero_p(double d);

And the comment occurs in src/mzscheme/src/number.c without any inline 
declaration


Posted on the users mailing list.