home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13562 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  1.1 KB

  1. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!uwm.edu!rpi!bu.edu!att!att!allegra!alice!ark
  2. From: ark@alice.att.com (Andrew Koenig)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: zero-length datatype
  5. Message-ID: <23659@alice.att.com>
  6. Date: 12 Sep 92 15:54:04 GMT
  7. References: <23654@alice.att.com> <1992Sep11.185505.17536@cadsun.corp.mot.com>
  8. Reply-To: ark@alice.UUCP ()
  9. Distribution: comp
  10. Organization: AT&T Bell Laboratories, Murray Hill NJ
  11. Lines: 17
  12.  
  13. In article <1992Sep11.185505.17536@cadsun.corp.mot.com> shang@corp.mot.com writes:
  14.  
  15. > That is why ISO C standard does not allow empty structure and zero 
  16. > number of array.
  17.  
  18. No, ISO C does allow empty structures.  It just says that they must
  19. occupy a non-zero amount of memory.
  20.  
  21. > But I don't see the reason why we can't have zero-size objects. Don't 
  22. > say that the standard explicitly says that. I want to know why it says 
  23. > that. So far, I haven't heard any convincing argument.
  24.  
  25. I don't really know why.  What I do know is that the presence of that requirement
  26. in the C standard makes it hard to avoid the same requirement in the C++ standard.
  27. -- 
  28.                 --Andrew Koenig
  29.                   ark@europa.att.com
  30.