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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,971aa11c293c3db1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-23 18:57:18 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc2.on.home.com.POSTED!not-for-mail Message-ID: <3B5CD5F8.F27E1C4E@home.com> From: "Warren W. Gay VE3WWG" X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada The Best Language? References: <5be89e2f.0107170838.c71ad61@posting.google.com> <5be89e2f.0107180235.726d46a8@posting.google.com> <9j3rrd$g71$1@s1.read.news.oleane.net> <5be89e2f.0107181300.4b4e93d7@posting.google.com> <3B57195E.A3A3FED@home.com> <9j93u6$1ua8$1@norfair.nerim.net> <3B586A17.862BA84D@home.com> <9j9s3t$kn8$1@wanadoo.fr> <9jej7c$7q1$1@wanadoo.fr> <9jff9l$sqp$1@wanadoo.fr> <3b5bd4b2.1217171@news.cis.dfn.de> <9jgmtp$3a1$1@norfair.nerim.net> <3b5c0a6b.1467500@news.cis.dfn.de> <9jh3p9$4cv$1@norfair.nerim.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 24 Jul 2001 01:57:18 GMT NNTP-Posting-Host: 24.141.193.224 X-Complaints-To: abuse@home.net X-Trace: news1.rdc2.on.home.com 995939838 24.141.193.224 (Mon, 23 Jul 2001 18:57:18 PDT) NNTP-Posting-Date: Mon, 23 Jul 2001 18:57:18 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:10487 Date: 2001-07-24T01:57:18+00:00 List-Id: Bertrand Augereau wrote: > > >I'm not sure a compiler has to take care of this error, though Ada > > >programmers might think otherwise. > > > > No doubts. BTW in Ada the counterpart of C++ switch statement shall > > cover all alternatives, so being translated into Ada > > > > switch (X) > > { > > case BLUE : break; > > } > > > > would be also illegal, because it is not clear what to do with RED and > > GREEN. > > Most compilers issue a warning when you do not test every alternative of an > enum. > GCC does for instance. I believe this is a relatively recent innovation on the part of GCC. It is certainly not part of other compilers (and GCC is hardly representative of the masses for C/C++). Even GCC does not report it by default. You have to enable this "feature". This is another area that Ada excels, because there is a compiler standard that dictates what the Ada compiler must flag (in all implementations). This is simply NOT true of C/C++ compilers on other platforms. HP's C compiler was one of the worst. I'd have to test this case on their C++ compiler, to know for sure, but I doubt it complains. -- Warren W. Gay VE3WWG http://members.home.net/ve3wwg