home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!tmb
- From: tmb@arolla.idiap.ch (Thomas M. Breuel)
- Newsgroups: comp.lang.c++
- Subject: Re: zero-length datatype
- Message-ID: <TMB.92Sep12212544@arolla.idiap.ch>
- Date: 13 Sep 92 01:25:44 GMT
- References: <1992Sep10.003726.27140@lucid.com> <1992Sep10.181836.9929@cadsun.corp.mot.com>
- <23654@alice.att.com>
- Sender: news@ai.mit.edu
- Reply-To: tmb@idiap.ch
- Distribution: comp
- Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
- Perceptive)
- Lines: 14
- In-reply-to: ark@alice.att.com's message of 11 Sep 92 13:50:56 GMT
-
- In article <23654@alice.att.com> ark@alice.att.com (Andrew Koenig) writes:
-
- In article <1992Sep10.181836.9929@cadsun.corp.mot.com> shang@corp.mot.com writes:
-
- > Note that C g++ implements empty struct or class with size of zero.
- > g++ also allows an array with zero number of member with size of zero.
-
- Unfortunately, this violates the ISO C standard, which explicitly says
- that there are no zero-size objects.
-
- I think Shang's claim is false. GNU C++ 2.2.2 reserves at least 1 byte
- for the empty structure.
-
- Thomas.
-