Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!linus!alliant!tj From: tj@alliant.UUCP Newsgroups: comp.unix.wizards,comp.lang.c Subject: Re: Motivation behind a particular piece of code in cpp Message-ID: <917@alliant.Alliant.COM> Date: Thu, 3-Dec-87 15:06:33 EST Article-I.D.: alliant.917 Posted: Thu Dec 3 15:06:33 1987 Date-Received: Sun, 6-Dec-87 22:09:20 EST References: <981@gumby.UUCP> Reply-To: tj@alliant.UUCP (Tom Jaskiewicz) Organization: Alliant Computer Systems, Littleton, MA Lines: 21 Keywords: cpp, static, STATIC Xref: utgpu comp.unix.wizards:5381 comp.lang.c:5408 In article <981@gumby.UUCP> uday@mips.UUCP (Uday Kurkure) writes: > I do not understand the motivation behind a following declaration > found in the sources of cpp. > > #define STATIC > > Then there are various declartions of the sort > STATIC char ch. > > If STATIC is defined to be null, why would one use it in declarations ? I use STATIC declarations like this in my own code to indicate variables and routines that could be declared static. That is, I could #define STATIC to be static and the code would still work, because there are no references to STATIC variables outside of the source file. The reason I don't declare such things to be static is that global symbols are useful for adb and gprof. So don't think of STATIC as null; it's really a comment masquerading as code.