🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1411

gcc-2.3.2 / NCR-3350 SVR4.02 float.h bug

#1411
From: Tom McConnell
Date: Tue, 22 Dec 1992 02:53
136 lines
5563 bytes
  Howdy.

  I have finished porting gcc-2.3.2 to the NCR-3350, and used it to compile
X11R5p21 and libg++-2.3. This report concerns the float.h include file.

    Cheers,

    Tom McConnell

 Tom McConnell          |     Internet: tmcconne@sedona.intel.com
 Intel, Corp. C3-91     |     Phone: (602)-554-8229
 5000 W. Chandler Blvd. | The opinions expressed are my own. No one in 
 Chandler, AZ  85226    | their right mind would claim them.

Problem: Warnings for differences between ./include/float.h and
        ./include/syslimits.h

Program: float.c

/* Highlight problems between syslimits.h and float.h */
#include <syslimits.h>
#include <float.h>
main(){}

Example compile:

faust> gmake -f Makefile_float
gcc -v    -c float.c -o float.o
Reading specs from /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/specs
gcc version 2.3.2
 /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/cpp -lang-c -v -undef -D__GNUC__=2
 -Di386 -Dunix -D__svr4__ -D__i386__ -D__unix__ -D__svr4__ -D__i386 -D__unix
 -D__svr4__ -Asystem(unix) -Acpu(i386) -Amachine(i386) float.c
 /var/tmp/cca003Qb.i
GNU CPP version 2.3.2 (i386 System V Release 4)
In file included from float.c:3:
/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/float.h:19: warning:
 `FLT_MIN' redefined
/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/syslimits.h:126:
 warning: this is the location of the previous definition
/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/float.h:25: warning:
 `FLT_MAX' redefined
/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/syslimits.h:125: warning:
 this is the location of the previous definition
/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/float.h:38: warning:
 `DBL_MIN' redefined
/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/syslimits.h:123: warning:
 this is the location of the previous definition
/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/float.h:44: warning:
 `DBL_MAX' redefined
/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/syslimits.h:122: warning:
 this is the location of the previous definition
 /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/cc1 /var/tmp/cca003Qb.i -quiet
 -dumpbase float.c -version -o /var/tmp/cca003Qb.s
GNU C version 2.3.2 (i386 System V Release 4) compiled by GNU C version 2.3.2.
 /usr/ccs/bin/as -V -Qy -o float.o /var/tmp/cca003Qb.s
as: Standard C Development Environment  (SCDE) 5.0  04/19/90
rm -f float
gcc -v -g -o float float.o
Reading specs from /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/specs
gcc version 2.3.2
 /usr/ccs/bin/ld -V -Y P,/usr/ccs/lib:/usr/lib -Qy -o float /usr/ccs/lib/crt1.o
 /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xa.o
 /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/crtbegin.o
 -L/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2 -L/usr/ccs/bin -L/usr/ccs/lib
 -L/stor/gnu/iAWS/lib float.o -lgcc -lc
 /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/crtend.o /usr/ccs/lib/crtn.o -lgcc
ld: Standard C Development Environment  (SCDE) 5.0  04/19/90

Analysis: <float.h> uses a lower case "e" in the indicated definitions,
            where <syslimits.h> uses an upper case "E".

Solution: Modify <float.h> to use upper case "E".

Patch:

This patch file was created on Tue Dec 22 09:38:19 MST 1992.

The top level directory was /a/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include


*** ./float.h_orig	Tue Dec 22 09:11:09 1992
--- ./float.h	Sun Dec 20 01:46:58 1992
***************
*** 17,21 ****
  #define FLT_MIN_EXP (-125)
     /* Minimum normalised float */
! #define FLT_MIN 1.17549435e-38F
     /* Minimum int x such that 10**x is a normalised float */
  #define FLT_MIN_10_EXP (-37)
--- 17,21 ----
  #define FLT_MIN_EXP (-125)
     /* Minimum normalised float */
! #define FLT_MIN 1.17549435E-38F
     /* Minimum int x such that 10**x is a normalised float */
  #define FLT_MIN_10_EXP (-37)
***************
*** 23,27 ****
  #define FLT_MAX_EXP 128
     /* Maximum float */
! #define FLT_MAX 3.40282347e+38F
     /* Maximum int x such that 10**x is a representable float */
  #define FLT_MAX_10_EXP 38
--- 23,27 ----
  #define FLT_MAX_EXP 128
     /* Maximum float */
! #define FLT_MAX 3.40282347E+38F
     /* Maximum int x such that 10**x is a representable float */
  #define FLT_MAX_10_EXP 38
***************
*** 36,40 ****
  #define DBL_MIN_EXP (-1021)
     /* Minimum normalised double */
! #define DBL_MIN 2.2250738585072014e-308
     /* Minimum int x such that 10**x is a normalised double */
  #define DBL_MIN_10_EXP (-307)
--- 36,40 ----
  #define DBL_MIN_EXP (-1021)
     /* Minimum normalised double */
! #define DBL_MIN 2.2250738585072014E-308
     /* Minimum int x such that 10**x is a normalised double */
  #define DBL_MIN_10_EXP (-307)
***************
*** 42,46 ****
  #define DBL_MAX_EXP 1024
     /* Maximum double */
! #define DBL_MAX 1.7976931348623157e+308
     /* Maximum int x such that 10**x is a representable double */
  #define DBL_MAX_10_EXP 308
--- 42,46 ----
  #define DBL_MAX_EXP 1024
     /* Maximum double */
! #define DBL_MAX 1.7976931348623157E+308
     /* Maximum int x such that 10**x is a representable double */
  #define DBL_MAX_10_EXP 308
  
Technical Details
Message-ID: <9212221653.AA31117@thunder.intel.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!sedona.intel.com!tmcconne

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!sedona.intel.com!tmcconne
From: tmcconne@sedona.intel.com (Tom McConnell)
Subject: gcc-2.3.2 / NCR-3350 SVR4.02 float.h bug
Message-ID: <9212221653.AA31117@thunder.intel.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 22 Dec 1992 02:53:05 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 137