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

  1. Newsgroups: comp.std.c
  2. Path: sparky!uunet!spool.mu.edu!think.com!enterpoop.mit.edu!eff!news.oc.com!utacfd.uta.edu!rwsys!sneaky!gordon
  3. From: gordon@sneaky.lonestar.org (Gordon Burditt)
  4. Subject: Re: Maximum depth of #if preprocessing directives
  5. Message-ID: <C01q3x.Bpp@sneaky.lonestar.org>
  6. Organization: Gordon Burditt
  7. References: <JET.92Dec24133237@boxer.nas.nasa.gov> <BzsK12.5Ky@jrd.dec.com> <1992Dec29.001933.25655@lucid.com>
  8. Date: Wed, 30 Dec 1992 00:16:40 GMT
  9. Lines: 20
  10.  
  11. >Just to put my cards on the table.  X3J16/SC22 (C++ standards
  12. >committee) is sharply divided on whether to have a section on
  13. >limits.  Some of us, including myself, argue that without such
  14. >a section any limit is a bug. With such a section arbitrary limits
  15. >are somehow condoned as suggested by Norman's comment, and we
  16. >don't want to condone any limits.
  17.  
  18. How can you possibly avoid some kind of limit?  Even an implementation
  19. that uses arbitrary-precision arithmetic for something such as
  20. #if nesting level is going to have SOME limit, like 
  21. 2^(MAXLONG*sizeof(unsigned long)*CHAR_BIT) (where ^ is an exponentiation
  22. operator), even if it's outrageously large.  
  23.  
  24. Is 32767 an unreasonable limit on the nesting level?  Well, it wouldn't
  25. cost that much to put the counts in a 32-bit long.  Do I need to go to 
  26. (about) 2^(2^37)?  (about 137 billion bits in the number)  Or is that 
  27. too small?
  28.  
  29.                     Gordon L. Burditt
  30.                     sneaky.lonestar.org!gordon
  31.