Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* DEC OSF/1 2.0 limits.h and core dump using INT_MAX
@ 1994-06-05 17:35 Richard Mauri
  1994-06-06  0:17 ` Dirk Grunwald
  1994-06-06  8:32 ` Burkhard Neidecker-Lutz
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Mauri @ 1994-06-05 17:35 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1994-06-06  8:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-06-05 17:35 DEC OSF/1 2.0 limits.h and core dump using INT_MAX Richard Mauri
1994-06-06  0:17 ` Dirk Grunwald
1994-06-06  8:32 ` Burkhard Neidecker-Lutz

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