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

  1. Newsgroups: comp.std.c
  2. Path: sparky!uunet!stanford.edu!lucid.com!lucid.com!jss
  3. From: jss@lucid.com (Jerry Schwarz)
  4. Subject: Re: Maximum depth of #if preprocessing directives
  5. Message-ID: <1992Dec31.023341.16602@lucid.com>
  6. Sender: usenet@lucid.com
  7. Reply-To: jss@lucid.com (Jerry Schwarz)
  8. Organization: Lucid, Inc.
  9. References: <JET.92Dec24133237@boxer.nas.nasa.gov> <BzsK12.5Ky@jrd.dec.com> <1992Dec29.001933.25655@lucid.com> <C01q3x.Bpp@sneaky.lonestar.org>
  10. Date: Thu, 31 Dec 92 02:33:41 GMT
  11. Lines: 35
  12.  
  13. Jss:
  14. |> >Just to put my cards on the table.  X3J16/SC22 (C++ standards
  15. |> >committee) is sharply divided on whether to have a section on
  16. |> >limits.  Some of us, including myself, argue that without such
  17. |> >a section any limit is a bug. With such a section arbitrary limits
  18. |> >are somehow condoned as suggested by Norman's comment, and we
  19. |> >don't want to condone any limits.
  20. |> 
  21.  
  22. Gordon Burditt
  23. |> How can you possibly avoid some kind of limit?  Even an implementation
  24. |> that uses arbitrary-precision arithmetic for something such as
  25. |> #if nesting level is going to have SOME limit, like 
  26. |> 2^(MAXLONG*sizeof(unsigned long)*CHAR_BIT) (where ^ is an exponentiation
  27. |> operator), even if it's outrageously large.  
  28. |> 
  29.  
  30. Jss:
  31. Of course I'll run out of some resource eventually, but chances
  32. are it will not translate directly into any of the numbers in
  33. the standard, and it may vary from run to run.  Why should
  34. the particular limits in the standard be singled out for special
  35. treatment? 
  36.  
  37. My contention is that these limits are a quality of implementation
  38. issue rather than a conformance issue. And as such don't belong in
  39. the standard proper.
  40.  
  41. Most of the actual limits in the C standard are ridiculously low. 
  42. If I tried to promulgate a compiler that enforced these limits on a 
  43. UNIX workstation (which is the market Lucid sells into) I doubt that I 
  44. would get a single customer.   
  45.  
  46.   -- Jerry Schwarz
  47.  
  48.