octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unwarranted old-style cast warning and non-critical error


From: John W. Eaton
Subject: Re: Unwarranted old-style cast warning and non-critical error
Date: Thu, 23 Aug 2012 12:33:32 -0400

On 23-Aug-2012, Daniel J Sebald wrote:

| On 08/22/2012 03:37 PM, John W. Eaton wrote:
| > On 17-Aug-2012, Daniel J Sebald wrote:
| 
| [snip]
| 
| > | However, INT_MIN and DBL_MIN are not analogous.  DBL_MIN is the smallest
| > | positive double value (i.e., greater than zero).  I printed out the value:
| > |
| > | DBL_MIN = 2.22507e-308
| > |
| > | If the minval is meant to be -DBL_MAX, apparently this doesn't make a
| > | difference in behavior, otherwise a bug would have shown up long ago.
| >
| > Right.  I went with -octave_Inf and octave_Inf instead.
| >
| > I also checked in another change that replaces all uses of DBL_MIN,
| > DBL_MAX, DBL_EPSILON, FLT_MIN, FLT_MAX, and FLT_EPSILON in C++ code
| > with std::numeric_limits functions.
| 
| That's gotten rid of most of the warnings, but there are several still 
| hanging around in the smaller lib subdirectories where there seem to be 
| ".in" files that are translated upon ./configure.  Try

OK, I checked in another change for these:

 http://hg.savannah.gnu.org/hgweb/octave/rev/61822c866ba1

BTW, I was not seeing warnings about the use of any of these
{FLT,DBL}_{MAX,MIN,EPSILON} macros on my system.  When using C++, they
are apparently defined as

  double(2.22044604925031308085e-16L)

(for example).  When using C, they are defined as ((double)VAL).

What GCC version do you have?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]