home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / std / c / 3285 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.6 KB  |  35 lines

  1. Newsgroups: comp.std.c
  2. Path: 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
  3. From: diamond@jit533.jit.dec.com (Norman Diamond)
  4. Subject: Re: Maximum depth of #if preprocessing directives
  5. Message-ID: <C02CLz.23F@jrd.dec.com>
  6. Sender: usenet@jrd.dec.com (USENET News System)
  7. Nntp-Posting-Host: jit533.jit.dec.com
  8. Reply-To: diamond@jit.dec.com (Norman Diamond)
  9. Organization: Digital Equipment Corporation Japan , Tokyo
  10. References: <JET.92Dec24133237@boxer.nas.nasa.gov> <1992Dec29.203355.7317@thinkage.on.ca>
  11. Date: Wed, 30 Dec 1992 08:22:47 GMT
  12. Lines: 21
  13.  
  14. In article <1992Dec29.203355.7317@thinkage.on.ca> dat@thinkage.on.ca (David Adrien Tanguay) writes:
  15. >jet@boxer.nas.nasa.gov (J. Eric Townsend) writes:
  16. >>I looked in 2.2.4.1, but I don't recognize any of the translation
  17. >>limits as applying to the maximum depth of #if directives.
  18.  
  19. >Doesn't "8 nesting levels of conditional inclusion" cover it?
  20. >(old ANSI 2.2.4.1 page 14 line 3, the second limit)
  21.  
  22. Yup.  Fooled me too.  In fact, now I find a whole raft of preprocessor
  23. limits limits scattered around 2.2.4.1:
  24. line  3, nesting of #if's;
  25. line  8, length of macro name;
  26. line 12, number of macro names;
  27. lines 15 to 16, numbers of macro parameters and arguments (which seems
  28.            redundant, since arguments must always match parameters);
  29. line 20, nesting of #included files.
  30. I'd say this table represents an example of spaghetti code :-)
  31. --
  32. Norman Diamond                diamond@jit.dec.com
  33. If this were the company's opinion, I wouldn't be allowed to post it.
  34. Pardon me?  Or do I have to commit a crime first?
  35.