Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!zaphod.mps.ohio-state.edu!usc!jarthur!uunet!isavax.isa.com!cjbsys!cliffb From: cliffb@cjbsys.bdb.com (cliff bedore) Newsgroups: comp.unix.xenix.sco Subject: Re: cc really dumps core on this program. why? Message-ID: <1990Aug30.002705.469@cjbsys.bdb.com> Date: 30 Aug 90 00:27:05 GMT References: <1990Aug28.041601.5515@d.cs.okstate.edu> <13116@hydra.gatech.EDU> Organization: BDB Systems Lines: 47 In article <13116@hydra.gatech.EDU> gt0178a@prism.gatech.EDU (BURNS,JIM) writes: >in article <1990Aug28.041601.5515@d.cs.okstate.edu>, klarich@d.cs.okstate.edu (KLARICH TERRY JAME) says: >< #include >< #include >< >< struct { >< double min,max; >< } range = {MINDOUBLE,MAXDOUBLE}; >< >< main() >< { >< printf("range.min = %E, range.max = %E\n",range.min,range.max); >< } >< -------------------------------------------------------------------------------- >< This program causes the cc compiler to dump core. I am using Xenix 2.3.2 >< with the lng085 update. > >Just as a point of interest, this compiles and executes fine on HP-UX 7.0, >SunOS 4.0.3, and Ultrix 2.2. However, it gets the compile error 'illegal >initialization' under A/UX 1.1, or the ATT universe on Dynix 2.0v2. > >-- >BURNS,JIM >Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 >uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a >Internet: gt0178a@prism.gatech.edu OK I couldn't take it any more so I started playing. It appears that the value for MINDOUBLE is wrong in values.h. I played around and the program below works e-321 appears to be as small as you can go #include #include struct { double min,max; } range = {4.940656e-321,1.797693e+308,}; /* } range = {MINDOUBLE,MAXDOUBLE}; */ main() { printf("range.min = %E, range.max = %E\n",range.min,range.max); /* printf("range.min = %E, range.max = %E\n",range.min,range.max); */ }