[Numeric-interest] fdlibm-comments from v.anandv at gmail.com: warning C4756: overflow in constant arithmetic in FDLIBM

David Hough 754R work 754r at ucbtest.org
Thu Sep 23 15:41:04 PDT 2010



Date: Thu, 18 Jun 2009 14:03:29 +0530
From: Vivek Anand <v.anandv at gmail.com>
Subject: warning C4756: overflow in constant arithmetic in FDLIBM
To: fdlibm-comments at sun.com

Dear Sir,

I am using fdlibm 5.3 in our solution. We are using Microsoft Visual Studio
2008 to deploy the project. We are trying to compile the project in two
configurations viz. Debug and Release.

In the Debug mode, it is compiling without any errors but with few warnings.
Some of the warnings are :

a.) unary minus operator applied to unsigned type, result still unsigned
b.) fdlibm_cos' undefined; assuming extern returning int
c.) '=' : conversion from 'const double' to 'int', possible loss of data
d.) '<' : signed/unsigned mismatch

In total there are 14 warnings in building the project in debug mode.

In the Release mode, it was giving 16 errors and 14 warnings. The error was
related to conflict of the existing function name with the intrinsic
function name. I renamed all the error related functions and I got the
success in removing all the errors.

I am using this library in Managed C++ and after building the Managed C++
project, I am getting additional 5 warnings from FDLIB saying

a.) e_exp.c(124) : warning C4756: overflow in constant arithmetic
b.) e_exp.c(124) : warning C4756: overflow in constant arithmetic

I just want to remove this warnings from the code.

It would request you to please look into this issue and please let me know
if you want to get more information from me.

regards
Vivek Anand




More information about the Numeric-interest mailing list