Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: richm@netcom.com (Richard Mauri)
Subject: DEC OSF/1 2.0 limits.h and core dump using INT_MAX
Date: Sun, 5 Jun 1994 17:35:48 GMT	[thread overview]
Message-ID: <richmCqxq7o.170@netcom.com> (raw)

I am beginning a port of a large system to DEC alpha 3000 OSF/1 2.0.
We had code that was expecting long to be 32 bits and using limits.h
LONG_MAX to initialize them. In an effort to test a solution replacing
long's with a typedef'd INT_32 int and LONG_MAX with INT_MAX I discovered
to things that I was hoping someone could shed somre light on.

1. limits.h does not define LONG_MAX, INT_MAX like my trusty POSIX
complience guide says it should. They appear to be set by cpp or cc.
With all the hype about DEC's standard compliance this strikes me as strange.

2. If I write, compile and run a trivial program:
/* no need for 
#include <limits.h>
as far as default cc is concerned.
*/
main()
{
	char c[MAX_INT];
}
It core dumps at run time. Very strange and definitely a bug IMHO.
Anyone else know about this or experienced such?

Rich Mauri



             reply	other threads:[~1994-06-05 17:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-06-05 17:35 Richard Mauri [this message]
1994-06-06  0:17 ` DEC OSF/1 2.0 limits.h and core dump using INT_MAX Dirk Grunwald
1994-06-06  8:32 ` Burkhard Neidecker-Lutz
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox