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