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.0 required=5.0 tests=BAYES_00,URI_WP_DIRINDEX autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ab1d177a5a26577d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!h40g2000pre.googlegroups.com!not-for-mail From: KK6GM Newsgroups: comp.lang.ada Subject: Re: What's wrong with C++? Date: Wed, 16 Feb 2011 11:36:53 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <1ee1a434-4048-48f6-9f5e-d8126bebb808@r19g2000prm.googlegroups.com> <4D5C1824.3020509@obry.net> <21443638-5ec6-49d4-aafe-6fbc1e59daba@r19g2000prm.googlegroups.com> NNTP-Posting-Host: 12.35.64.226 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1297885013 9984 127.0.0.1 (16 Feb 2011 19:36:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 16 Feb 2011 19:36:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h40g2000pre.googlegroups.com; posting-host=12.35.64.226; posting-account=qZVz2QoAAAAN9WxYp-9jYb7jORc4Zqwt User-Agent: G2/1.0 X-HTTP-Via: 1.1 barracudaweb.tritool.rancho:8080 (http_scan/4.0.2.6.19) X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MDDR; .NET4.0C; .NET4.0E; InfoPath.1),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:18277 Date: 2011-02-16T11:36:53-08:00 List-Id: On Feb 16, 11:09=A0am, Hyman Rosen wrote: > On 2/16/2011 1:32 PM, Pascal Obry wrote: > > > just have a look at Barnes book "Safe and Secure Software". > >http://www.adacore.com/home/ada_answers/ada_2005/safe_secure/ > > I quickly found that it cheats: > 2008/04/02_safe_secure_ada_2005_safe_typing.pdf> > > In the section where it discusses enumeration types, > it carefully limits itself to discussing C rather > than C++ although it discusses C++ elsewhere so that > it can make the more extreme comparison: > > =A0 =A0 =A0...an enumeration type in Ada truly is a different > =A0 =A0 =A0type and not a shorthand for an integer type. > > In C++ an enumeration type is also a different type and > not a shorthand for an integer type, and its enumeration > literals are of that type. Will a C++ compiler will reject this? enum {Red, Green, Blue}; int x =3D Red + Green; You might argue that this is a different issue, but I'm still curious.