🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2925

Re: Maximum depth of #if preprocessing directives

#2925
From: Norman Diamond
Date: Wed, 30 Dec 1992 08:22
21 lines
1710 bytes
In article <1992Dec29.203355.7317@thinkage.on.ca> dat@thinkage.on.ca (David Adrien Tanguay) writes:
>jet@boxer.nas.nasa.gov (J. Eric Townsend) writes:
>>I looked in 2.2.4.1, but I don't recognize any of the translation
>>limits as applying to the maximum depth of #if directives.

>Doesn't "8 nesting levels of conditional inclusion" cover it?
>(old ANSI 2.2.4.1 page 14 line 3, the second limit)

Yup.  Fooled me too.  In fact, now I find a whole raft of preprocessor
limits limits scattered around 2.2.4.1:
line  3, nesting of #if's;
line  8, length of macro name;
line 12, number of macro names;
lines 15 to 16, numbers of macro parameters and arguments (which seems
           redundant, since arguments must always match parameters);
line 20, nesting of #included files.
I'd say this table represents an example of spaghetti code :-)
--
Norman Diamond                diamond@jit.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
Pardon me?  Or do I have to commit a crime first?
Technical Details
Message-ID: <C02CLz.23F@jrd.dec.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!deccrl!news.crl.dec.com!dbased.nuo.dec.com!e2big.mko.dec.com!jrdzzz.jrd.dec.com!jit533.jit.dec.com!diamond
References: <JET.92Dec24133237@boxer.nas.nasa.gov> <1992Dec29.203355.7317@thinkage.on.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!deccrl!news.crl.dec.com!dbased.nuo.dec.com!e2big.mko.dec.com!jrdzzz.jrd.dec.com!jit533.jit.dec.com!diamond
From: diamond@jit533.jit.dec.com (Norman Diamond)
Subject: Re: Maximum depth of #if preprocessing directives
Message-ID: <C02CLz.23F@jrd.dec.com>
Sender: usenet@jrd.dec.com (USENET News System)
Nntp-Posting-Host: jit533.jit.dec.com
Reply-To: diamond@jit.dec.com (Norman Diamond)
Organization: Digital Equipment Corporation Japan , Tokyo
References: <JET.92Dec24133237@boxer.nas.nasa.gov> <1992Dec29.203355.7317@thinkage.on.ca>
Date: Wed, 30 Dec 1992 08:22:47 GMT
Lines: 21