klarich@d.cs.okstate.edu (KLARICH TERRY JAME) (08/22/90)
Earlier this month, I posted an article asking why my c compiler dumps core
on a certain program. At the time I typed in the program, I didn't get it
right. I got some messages saying that the program ran fine. Here is the
original program.
--------------------------------------------------------------------------------
#include <stdio.h>
#include <values.h>
main()
{
double d;
d = MAXDOUBLE;
printf("%E\n",d);
--------------------------------------------------------------------------------
This program does work as expected. However, the next one doesn't.
--------------------------------------------------------------------------------
#include <stdio.h>
#include <values.h>
struct {
double min,max;
} range = {MINDOUBLE,MAXDOUBLE};
main()
{
printf("min = %E, 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.
If anyone can tell me how to fix this problem, I would sure appreciate the
help.
Terry Klarich <klarich@d.cs.okstate.edu> or <terry@unx.ucc.okstate.edu>ken@dali.gatech.edu (Ken Seefried iii) (08/24/90)
-- You know...you'd probably get a whole lot more help if you posted to a newsgroup remotely related to c compilers... -- ken seefried iii ken@dali.gatech.edu "Vee haf veyz off making you talk...release da veasles..."