Re: [Mingw-w64-public] enhancements on the win32 to win64 conversion

2011-05-23 Thread RSPsoftware
] enhancements on the win32 to win64 conversion Para: mingw-w64-public@lists.sourceforge.net Data: Segunda-feira, 23 de Maio de 2011, 12:09 Your code violates strict aliasing. This is your problem here. Use instead of address cast to integer a union construct and your code will behave as you expect

Re: [Mingw-w64-public] enhancements on the win32 to win64 conversion

2011-05-23 Thread RSPsoftware
thanks a lot, and I will remember also to always use -Wall when converting win32 code to win64 --- Em seg, 23/5/11, Kai Tietz escreveu: De: Kai Tietz Assunto: Re: [Mingw-w64-public] enhancements on the win32 to win64 conversion Para: mingw-w64-public@lists.sourceforge.net Data: Segunda-feira

Re: [Mingw-w64-public] enhancements on the win32 to win64 conversion

2011-05-23 Thread Kai Tietz
Your code violates strict aliasing. This is your problem here. Use instead of address cast to integer a union construct and your code will behave as you expect. Nevertheless why aren't you simply using here +0.5? You can try if your code works with option -fno-strict-aliasing. Regards, Kai --

Re: [Mingw-w64-public] enhancements on the win32 to win64 conversion

2011-05-23 Thread RSPsoftware
believe or not it work on win32 but now for win32 and win64 I am using int = float + 0.5 and it is also working --- Em seg, 23/5/11, Ruben Van Boxem escreveu: De: Ruben Van Boxem Assunto: Re: [Mingw-w64-public] enhancements on the win32 to win64 conversion Para: mingw-w64-public

Re: [Mingw-w64-public] enhancements on the win32 to win64 conversion

2011-05-23 Thread Ruben Van Boxem
2011/5/23 RSPsoftware > the compiler dont show a warning about the win32 to win64 conversion in the > following function, it would be great if the compiler report at least a > warning about it > > this function fail miserably in win64, and I have only detected it after > the compilation and tests

[Mingw-w64-public] enhancements on the win32 to win64 conversion

2011-05-23 Thread RSPsoftware
the compiler dont show a warning about the win32 to win64 conversion in the following function, it would be great if the compiler report at least a warning about it this function fail miserably in win64, and I have only detected it after the compilation and tests   intround_trick (float floatval