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.1 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a6fe9ef21ba269dc X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Re: Ada Smileys in C++ lib Conversion Date: Tue, 17 Aug 2010 12:57:11 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <1a9b39b0-73f6-497c-a8f4-abf8129886ac@t20g2000yqa.googlegroups.com> <9b88e5a4-c588-4997-ad5c-2efa216fe4f4@a4g2000prm.googlegroups.com> <95tc66hjv3stdk0nhdv9o46e5l2ecdog5j@4ax.com> Injection-Date: Tue, 17 Aug 2010 12:57:11 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="15771"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181BKesEYAY5dh32T2IJpAH1JZWtTKJO5Y=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:1iXqN/AYRPiaoUEAJZfOQo4EFjA= Xref: g2news1.google.com comp.lang.ada:13454 Date: 2010-08-17T12:57:11+00:00 List-Id: Maciej Sobczak expounded in news:be7c80ac-3fce-4779-8542- 115567f649de@g17g2000yqe.googlegroups.com: > On 16 Sie, 16:54, Warren wrote: > >> > const int MC_CTL_LOCAL_C �= 0x80; >> > and so on. > >> Another approach is to declare them as enums. But this >> is unhelpful because they are all implemented as int's. > > No. Enums are separate types. They are considered different "types" but (in C at least), they're implemented as ints. IOW, you can't mix the enums but you can supply an enum in an int argument. >> Further, the switch statement doesn't tell you about the >> cases which are missing. > > Try g++ -Wswitch. GCC extension. Try it on HP or AIX C compiler. Warren