hxl0809 / caelum

Automatically exported from code.google.com/p/caelum
0 stars 0 forks source link

Caelum generates 96 build warnings under Visual Studio 9 (2008) or above. #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build Caelum in Visual Studio

What is the expected output? What do you see instead?

0 errors, 0 warnings.  Most (if not all) of the warnings involve Microsoft's 
tightening of data loss warnings when converting from double to float.  Most 
(if not all) of these warnings in Caelum are spurious (with the notable 
exception of astronomy routines that may require high accuracy).

What version of the product are you using? On what operating system?

0.6 on Win32

Please provide any additional information below.

#pragma suppression of the warnings would be acceptable, but suffixing all 
numeric constants with the appropriate 'f' code is probably preferable.

Original issue reported on code.google.com by drag...@gmail.com on 11 May 2011 at 10:38

GoogleCodeExporter commented 9 years ago
Attached is a patch applying 'f' suffixes to all floating point constants, with 
the exception of those present in BrightStarCatalogue.cpp.  
BrightStarCatalogue.cpp contains the appropriate pragma.  **THIS PATCH IS 
SLIGHTLY WRONG.**  The pragma is not surrounded by appropriate platform guards, 
so it may fail to build as-is under gcc.  Alternatively, the contents of 
BrightStarCatalogue.cpp could be regenerated using a slightly modified regexp 
and the original input data from NASA.  I leave the choice of solutions up to 
you.

Original comment by drag...@gmail.com on 11 May 2011 at 10:49

Attachments: