home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 18753 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.7 KB  |  50 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!swrinde!gatech!destroyer!cs.ubc.ca!uw-beaver!micro-heart-of-gold.mit.edu!xn.ll.mit.edu!ll.mit.edu!lebrun
  3. From: lebrun@ll.mit.edu (Steven F. LeBrun)
  4. Subject: Re: assert
  5. In-Reply-To: steve@taumet.com's message of Mon, 21 Dec 1992 16:30:06 GMT
  6. Message-ID: <9212211543.PN29748@LL.MIT.EDU>
  7. Sender: news@ll.mit.edu
  8. Organization: MIT Lincoln Laboratory, Lexington, MA
  9. References: <HBF.92Dec19163113@gandalf.uio.no> <1992Dec21.163006.8068@taumet.com>
  10. Date: Mon, 21 Dec 92 15:43:40 -0500
  11. Lines: 37
  12.  
  13.  
  14. >    The first alternative (#include <stdio.h>) is forbidden by the C
  15. >    Standard (standard headers may not #include other standard headers).
  16.                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  17.  
  18. I took a look at the ANSI C document (X3.159-1989) and could not find a
  19. section that states that standard header files cannot include other
  20. standard header files.  As a matter of fact, section 4.11.2 "Standard
  21. Headers" states that header files included in any order and may be 
  22. included more than once with the same effect as if they were included
  23. only once.  [There is an exception pointed out in this section about
  24. the <assert.h> header file.]
  25.  
  26. Since this section of the ANSI C document states that header files can 
  27. be included more than once and in any order (with the possible exception
  28. of <assert.h>) and does not explicitly state that standard headers may
  29. not include other standard headers, that standard headers may include
  30. other standard header files.  I would think that standard header files
  31. including other standard header files is almost a necessity in order that 
  32. standard header files may be include in any order and still keep the 
  33. standard header files as simple as practical.
  34.  
  35. If there is a section in the ANSI C standard that explicitly, or 
  36. implicitly, states that one standard header file can not include
  37. another standard header file, I would like to know about it.  Please,
  38. email the section number.
  39. --
  40.  
  41. +--------------------------------------------------------------------------+
  42. | Steven F. LeBrun             |      MIT Lincoln Laboratory, Group 91     |
  43. |                              |        244 Wood Street, Room LI-136       |
  44. | lebrun@ll.mit.edu (Internet) |          Lexington, MA 02173-9108         |
  45. | lebruns@merlin    (internal) |  Phone:(617)-981-5742, FAX:(617)-981-0991 |
  46. +--------------------------------------------------------------------------+
  47. |"Hard as lightning, soft as candlelight;                                  |
  48. |                    Dare you trust the Music of the Night?" - The Phantom |
  49. +--------------------------------------------------------------------------+
  50.