[llvm-commits] Fix floating point numbers in tests on MinGW

Danil Malyshev dmalyshev at accesssoftek.com
Thu Dec 9 14:37:07 PST 2010


Hi All,

> I'd rather see this fixed permanently by changing the code not to differ.

Let's discuss the patch changes the raw_ostream.

Pros:
> Output should be identical on any hosts as possible.
This makes sense and sounds good.
This patch will fix problems with any test, including those where there is no possibility to use the regexp, and uses a direct comparison of the text.

Cons:
This patch changes the text output of floating numbers. Both variants (-1.300000e+01 and -1.300000e+001) correspond to the scientific format and will be properly recognized as a person and machine. Thus, this patch is not functional and rather cosmetic.
In the changed operation still used printf. If again will differences in its output, it is can necessary again to change raw_ostream.


Maybe I missed something important.


Thank you,
Danil


-----Original Message-----
From: NAKAMURA Takumi [mailto:geek4civic at gmail.com] 
Sent: Thursday, December 09, 2010 3:09 AM
To: Danil Malyshev
Cc: llvm-commits LLVM; Dale Johannesen
Subject: Re: [llvm-commits] Fix floating point numbers in tests on MinGW

Danil,

Here it is;
Bug 6745 - .ll output is different on windows
http://llvm.org/bugs/show_bug.cgi?id=6745

> I'd rather see this fixed permanently by changing the code not to differ.

+1. Although it would be easier to relax these tests,
when a person wrote a test not on win32, he would not realize it might
fail on win32.
Output should be identical on any hosts as possible.

...Takumi




More information about the llvm-commits mailing list