This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Bug in egcs-1.1.1 : Fixincludes breaks float.h/limits/syslimits under Solaris 2.6
- To: egcs-bugs mailing-list <egcs at cygnus dot com>
- Subject: Bug in egcs-1.1.1 : Fixincludes breaks float.h/limits/syslimits under Solaris 2.6
- From: Rick Flower <Rick dot Flower at trw dot com>
- Date: Thu, 17 Dec 1998 15:12:33 -0800 (PST)
Apparently, this bug is still lingering in egcs-1.1.1 (it was also in 1.1b)
and effects the definition of DBL_MAX, DBL_MIN, FLT_MAX, FLT_MIN. I
initially reported this in early October. Anyway, it is apparent that
sometime prior to egcs-1.1b fixincludes was changed and caused this
problem under Solaris 2.6 (it may not be a problem under prior
versions of Solaris).
You can reproduce the problem by including <float.h> and then
<limits.h> as in the following example :
=============================================================================
#include <float.h>
#include <limits.h>
main()
{
}
=============================================================================
% gcc t.c
In file included from /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/include/limits.h:117,
from /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/include/syslimits.h:7,
from /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/include/limits.h:11,
from t.c:2:
/usr/include/limits.h:197: warning: `DBL_MAX' redefined
/usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/include/float.h:63: warning: this is the location of the previous definition
/usr/include/limits.h:199: warning: `DBL_MIN' redefined
/usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/include/float.h:54: warning: this is the location of the previous definition
/usr/include/limits.h:202: warning: `FLT_MAX' redefined
/usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/include/float.h:35: warning: this is the location of the previous definition
/usr/include/limits.h:203: warning: `FLT_MIN' redefined
/usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/include/float.h:26: warning: this is the location of the previous definition
% gcc -v
Reading specs from /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
For now, I've just commented out the inclusion of the next "limits.h"
as shown below :
//#ifdef _GCC_NEXT_LIMITS_H
//#include_next <limits.h> /* recurse down to the real one */
//#endif
I know that this isn't the right fix, but it works for the short term
and doesn't appear to cause any problems..
--Rick