Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!necntc!rayssd!gmp
From: gmp@rayssd.UUCP
Newsgroups: comp.unix.wizards
Subject: Re: Motivation behind a particular piece of code in cpp
Message-ID: <1706@rayssd.RAY.COM>
Date: Sat, 28-Nov-87 16:08:40 EST
Article-I.D.: rayssd.1706
Posted: Sat Nov 28 16:08:40 1987
Date-Received: Mon, 30-Nov-87 07:09:58 EST
References: <981@gumby.UUCP> <1963@natmlab.dms.oz>
Sender: gmp@rayssd.RAY.COM (Gregory M. Paris @ Raytheon Company, Portsmouth RI)
Reply-To: gmp@rayssd.RAY.COM (Gregory M. Paris)
Organization: Raytheon Company, Portsmouth RI
Lines: 22
Keywords: cpp, static, STATIC
Summary: one more reason

After reading a zillion articles about why one would want to use
STATIC, I have yet to see one suggesting it be used for the only reason
I've ever had to.  Note the following:

func()
{
	STATIC struct foo bar[LARGENUM];

	/* do something non-recursive */
}

I have a program with a function or two in it like this that compiles
and runs fine on our VAXen and Pyramid with STATIC undefined.  When the
the same code was brought to a Sun, it would not run (maybe not
compile -- don't remember now), so I defined STATIC as static and the
problem went away.  (Of course, STATIC had to be added, since I don't
normally sprinkle it throughout programs.)

-- 
Greg Paris                                       gmp@rayssd.ray.com
{cbosgd,gatech,ihnp4,mirror,necntc,uiucdcs,ukma,umcp-cs}!rayssd!gmp
Air can hurt you too.