From: "phasis68 (Heesob Park)" Date: 2013-10-23T17:19:20+09:00 Subject: [ruby-core:57985] [ruby-trunk - Bug #9044] Too many warnings with VC 2013 Issue #9044 has been updated by phasis68 (Heesob Park). Here is a part of math.h #ifndef _HUGE_ENUF #define _HUGE_ENUF 1e+300 /* _HUGE_ENUF*_HUGE_ENUF must overflow */ #endif /* _HUGE_ENUF */ #define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF)) /* causes warning C4756: overflow in constant arithmetic (by design) */ #define HUGE_VALD ((double)INFINITY) #define HUGE_VALF ((float)INFINITY) #define HUGE_VALL ((long double)INFINITY) #define NAN ((float)(INFINITY * 0.0F)) ---------------------------------------- Bug #9044: Too many warnings with VC 2013 https://bugs.ruby-lang.org/issues/9044#change-42561 Author: phasis68 (Heesob Park) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 2.1.0dev (2013-10-23 trunk 43392) [i386-mswin32_120] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN While building with Visual Studio Express 2013 on Windows 7, I can see many warnings like inconsistent dll linkage and overflow in constant arithmetic. Here is a part of warnings. C:\work\ruby-2.1.0-r43392\include\ruby/missing.h(73) : warning C4273: 'acosh' : inconsistent dll linkage C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(475) : see previous definition of 'acosh' C:\work\ruby-2.1.0-r43392\include\ruby/missing.h(74) : warning C4273: 'asinh' : inconsistent dll linkage C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(477) : see previous definition of 'asinh' C:\work\ruby-2.1.0-r43392\include\ruby/missing.h(75) : warning C4273: 'atanh' : inconsistent dll linkage C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(479) : see previous definition of 'atanh' C:\work\ruby-2.1.0-r43392\include\ruby/missing.h(91) : warning C4273: 'round' : inconsistent dll linkage C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(516) : see previous definition of 'round' C:\work\ruby-2.1.0-r43392\include\ruby/missing.h(113) : warning C4273: 'erf' : inconsistent dll linkage C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(486) : see previous definition of 'erf' C:\work\ruby-2.1.0-r43392\include\ruby/missing.h(114) : warning C4273: 'erfc' : inconsistent dll linkage C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(487) : see previous definition of 'erfc' C:\work\ruby-2.1.0-r43392\include\ruby/missing.h(118) : warning C4273: 'tgamma' : inconsistent dll linkage C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(524) : see previous definition of 'tgamma' C:\work\ruby-2.1.0-r43392\include\ruby/missing.h(126) : warning C4273: 'cbrt' : inconsistent dll linkage C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(482) : see previous definition of 'cbrt' math.c(381) : warning C4056: overflow in floating-point constant arithmetic math.c(463) : warning C4056: overflow in floating-point constant arithmetic math.c(478) : warning C4273: 'log2' : inconsistent dll linkage C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(504) : see previous definition of 'log2' math.c(523) : warning C4056: overflow in floating-point constant arithmetic math.c(565) : warning C4056: overflow in floating-point constant arithmetic c:\work\ruby-2.1.0-r43392\math.c(381) : warning C4756: overflow in constant arithmetic c:\work\ruby-2.1.0-r43392\math.c(382) : warning C4756: overflow in constant arithmetic c:\work\ruby-2.1.0-r43392\math.c(463) : warning C4756: overflow in constant arithmetic c:\work\ruby-2.1.0-r43392\math.c(565) : warning C4756: overflow in constant arithmetic c:\work\ruby-2.1.0-r43392\math.c(867) : warning C4756: overflow in constant arithmetic c:\work\ruby-2.1.0-r43392\math.c(523) : warning C4756: overflow in constant arithmetic I attached the whole nmake log. -- http://bugs.ruby-lang.org/