From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,74b958f114ec4924 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!postnews.google.com!b64g2000hsa.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Type convertion Date: Thu, 13 Mar 2008 01:33:46 -0700 (PDT) Organization: http://groups.google.com Message-ID: <22a25d83-4516-4f66-85b6-0382f2c951f5@b64g2000hsa.googlegroups.com> References: <47d6ae9b$1@news.broadpark.no> <878x0pt2gg.fsf@ludovic-brenta.org> <87r6efsmc7.fsf@ludovic-brenta.org> NNTP-Posting-Host: 137.138.182.223 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1205397227 31218 127.0.0.1 (13 Mar 2008 08:33:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 13 Mar 2008 08:33:47 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b64g2000hsa.googlegroups.com; posting-host=137.138.182.223; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20080211 Red Hat/1.5.0.12-0.10.el4 Firefox/1.5.0.12 pango-text,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20333 Date: 2008-03-13T01:33:46-07:00 List-Id: On 12 Mar, 21:45, Ludovic Brenta wrote: > Yes. My C is getting rustier by the day but I seem to remember that > the language standard does require enums to have the same size as int. No. The underlying type for enum has to be big enough to fit all defined values. It can be equivalent to int even for small sets, but does not have to be - in other words, it does not have to be bigger than necessary. And it can be larger that int for enums that don't fit in int. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com